Do you have a simple stand-alone application or a JUnit test case that shows the faulty behaviour? And does the file contain an empty SummaryInformation or none at all?
Am 24.11.2009 16:14, schrieb dpmihai:
> 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)
>
--
Rainer Klute
Software-Architekt
Telefon: +49 (0) 231 / 98 60-222
Telefax: +49 (0) 231 / 98 60-211
Mobil: +49 (0) 151 / 17396741
+49 (0) 172 / 2324824
http://www.itemis.de/
[email protected]
https://www.xing.com/profile/Rainer_Klute2
itemis AG
Am Brambusch 15-24
44536 Lünen
OpenPGP-Fingerprint: E4E4386515EE0BED5C162FBB5343461584B5A42E
- Wenn deine E-Mail vertraulicher als eine Postkarte sein soll...
Rechtlicher Hinweis:
Amtsgericht Dortmund, HRB 20621
Vorstand: Wolfgang Neuhaus, Jens Wagener, Dr. Georg Pietrek
Aufsichtsrat: Dr. Burkhard Igel(Vors.), Stephan Grollmann, Michael Neuhaus
signature.asc
Description: OpenPGP digital signature
