i am the submitter and it works now.
The only thing i change is the place of the creation of the HSSFRow.
Instead of creating ( or get his reference) for each cell, i create the row
int the first 'for'. It makes at least 10 minutes to make the file
but it works.



-----Message d'origine-----
De : Andrew C. Oliver [mailto:[EMAIL PROTECTED]]
Envoy� : jeudi 1 ao�t 2002 14:51
� : POI Users List; Marc Johnson; [EMAIL PROTECTED]
Objet : MEGA SST Record (was: Re: Impossible to read the file created)
(GLEN PLEASE READ)


Confirmed.  This generates an invalid spreadsheet.  It generates a LOT 
of unique strings, which looks like
it generates a symantically valid but obviously not valid enough SST 
record.  There are 160 continue records
for the SST table.  That is a LOT of continue records.

Anyone here a VB or VBA whiz?  Can someone write a spreadsheet with the 
SAME data using VB/OLE 2 Automation so we can see what Excel does with 
160 Continue records.  This might be the mysterious EXTSST record that 
both we don't mess
with yet.  I may try to open this with and save this with staroffice and 
see if we can read the star office version (along with excel).  I'm 
betting (since they don't handle EXTSST either) that Star/OpenOffice 
generates an invalid sheet as well.

Submitter, while we do need to fix this, its unlikely a real spreadsheet 
would have this many strings in it.  Generally spreadsheets would have 
more numbers than strings (you have NO numeric cells and WAY more 
strings than any real spreadsheet I've seen).

Thanks for reporting this,

-Andy

PS: attached is a compilable source that generates the invalid output

[EMAIL PROTECTED] wrote:

>doesnt work
>can someone try my code to see if it comes from the code or from my
>software?
>
>Thanks
>
>-----Message d'origine-----
>De : Hilbe Stefan [mailto:[EMAIL PROTECTED]]
>Envoy� : jeudi 1 ao�t 2002 14:12
>� : 'POI Users List'
>Objet : AW: Impossible to read the file created
>
>
>Hi
>
>try instead of
>
>moClasseur.write(new FileOutputStream("U:\\Test.xls"));}
>
>the following
>
>FileOutputStream fileOut = new FileOutputStream("U:\\Test.xls");
>moClasseur.write(fileOut);
>fileOut.close();
>
>I had the same problem. The file handle is not closed.
>
>-----Urspr�ngliche Nachricht-----
>Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Gesendet: Donnerstag, 1. August 2002 16:05
>An: [EMAIL PROTECTED]
>Betreff: RE: Impossible to read the file created
>
>
>I use the 1.5.1 and see the source below
>
>HSSFWorkbook moClasseur = new HSSFWorkbook();
>HSSFSheet moFeuille01 = moClasseur.createSheet("Essai Gd Fichier Feuille
>01");
>HSSFSheet moFeuille02 = moClasseur.createSheet("Essai Gd Fichier Feuille
>02");
>                       
>for(int i = 0; i < 3500;i++)
>{
> for(int j=0;j<40;j++)
> {
>       HSSFRow r = moFeuille01.createRow((short)i);
>       HSSFCell c = r.createCell((short)j);
>       c.setCellValue(i + " " + j);
> }
>}
>try{
>               moClasseur.write(new FileOutputStream("U:\\Test.xls"));}
>catch(Exception e)
>{}
>
>
>
>-----Message d'origine-----
>De : Andrew C. Oliver [mailto:[EMAIL PROTECTED]]
>Envoy� : jeudi 1 ao�t 2002 13:32
>� : POI Users List
>Objet : Re: Impossible to read the file created
>
>
>Do you have the source used to generate the file?  Secondly what version 
>of HSSF?  
>
>-Andy
>
>[EMAIL PROTECTED] wrote:
>
>  
>
>> One topic has already set the problem but none has resolve it. In fact, i
>>create one sheet with a lot of rows (for example 2000) and 40 columns for
>>each. I put not big data in cells, only 2 numbers. I run the program and
it
>>goes fine even if it takes long to make the output file (its size is about
>>4MB). The problem is coming when i want to open the file. I can't open it.
>>Excel 97 ( or 2000) tells me that " it is impossible to read the file".
>>    
>>
>Then
>  
>
>>i try to open the file with OpenOffice. And I can read it!
>>I try again with less rows (1000) and it works on Excel.
>>
>>What is the problem? At first sight, it is not coming from HSSF but from
>>Excel. If someone has ever had this problem, it would be nice to tell me
>>    
>>
>his
>  
>
>>solution.
>>
>>Thanks
>>
>>--
>>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>>
>>
>> 
>>
>>    
>>
>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>  
>



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

Reply via email to