poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpmihai <dpmi...@yahoo.com>
Subject SummaryInformation
Date Tue, 24 Nov 2009 15:14:11 GMT

I saw the example ModifyDocumentSummaryInformation.java  to modify a
SummaryInformation for excel files. But I do not know how to create this
information at the same time with the file. 

To modify on an existing file is like this :

           File poiFilesystem = new File(filePath);
            InputStream is = new FileInputStream(poiFilesystem);
            POIFSFileSystem poifs = new POIFSFileSystem(is);
            DirectoryEntry dir = poifs.getRoot();

            SummaryInformation si =
            // other properties

            si.write(dir, SummaryInformation.DEFAULT_STREAM_NAME);
            OutputStream out = new FileOutputStream(poiFilesystem);

But if I do not have the file yet, I saw that no property in
SumarryInformation is created.
Is there a way to create the information when we create the file?( before we
close the file output stream)
View this message in context: http://old.nabble.com/SummaryInformation-tp26497648p26497648.html
Sent from the POI - Dev mailing list archive at Nabble.com.

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

View raw message