works fine if you don't forget to create the second sheet with:

HSSFSheet s2 = wb.createSheet();

sorry for the trouble, spend half a day on this issue.

:-) 



-----Message d'origine-----
De : Danny Mui [mailto:[EMAIL PROTECTED]
Envoy� : mardi 27 janvier 2004 20:52
� : POI Users List
Objet : Re: Problem with sheet reference


that looks right.  pop in a bugzilla with the code you have here:
http://nagoya.apache.org/bugzilla/buglist.cgi?product=POI

Marot Laurent wrote:

> Hi all,
> 
> I'm facing a proble with code below:
> 
> HSSFWorkbook wb = new HSSFWorkbook(); 
> HSSFSheet s = wb.createSheet();
> wb.setSheetName(0,"Feuille1");
> //wb.setSheetName(1,"Feuille2");
> HSSFRow r = null;
> HSSFCell c = null;
> 
> // D�finitions
> HSSFName nomTest = wb.createName();
> nomTest.setNameName("myname");
> nomTest.setReference(wb.getSheetName(0)+"!$A$1:$A$1");
> 
> if i comment out line //wb.setSheetName(1,"Feuille2"); everytihing works fine but if 
> i leave it uncommented, i get an error while using to open the xls file
> 
> isn't it the right way to reference sheets ?
> 
> Thanks
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to