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);
is.close();
DirectoryEntry dir = poifs.getRoot();
SummaryInformation si =
PropertySetFactory.newSummaryInformation();
si.setTitle(title);
// other properties
si.write(dir, SummaryInformation.DEFAULT_STREAM_NAME);
OutputStream out = new FileOutputStream(poiFilesystem);
poifs.writeFilesystem(out);
out.close();
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: [email protected]
For additional commands, e-mail: [email protected]