I have a standalone application :

OutputStream fos = new FileOutputStream(fileName);
....
HSSFWorkbook wb = new HSSFWorkbook();
....
// do excel poi stuff
....
wb.write(fos);
fos.flush();
// (1)

fos.close();

// (2)

If I call the summary information <code> previously written at position (1)
no properties are set 
(and this is because POIFSFileSystem needs an input stream which I do not
have at that time). But if I call the <code> at position (2), meaning I have
a file on disk,  it works. 

I just want to create information at the same time with the file (1) and I
tried also with the HSSFWorkbook  as suggested :

SummaryInformation si = wb.getSummaryInformation();  
This method from WorkBook is inherited from POIDocument. (as I saw in api
documentation)

I get at this line the exception shown previously (NullPointerException) .
So I suppose there is no SummaryInformation yet.

And anyway I saw hat I have to write SummaryInformation (not just set
properties on it) which needs POIFSFileSystem  root.


-- 
View this message in context: 
http://old.nabble.com/SummaryInformation-tp26497648p26508848.html
Sent from the POI - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to