poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marot Laurent" <Laurent.Ma...@alliacom.com>
Subject [Solved] RE: Problem with sheet reference
Date Wed, 28 Jan 2004 08:39:36 GMT
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:danny@muibros.com]
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: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Mime
View raw message