https://issues.apache.org/bugzilla/show_bug.cgi?id=47839
Summary: can't open XLSX after updaten the custom properties
Product: POI
Version: 3.5-dev
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: POI Overall
AssignedTo: [email protected]
ReportedBy: [email protected]
hello
i tried to update custom properties of a remote xlsx document, which is located
in a local network, via outputstream.
after writing the file, i can't open it, because some parts seems to be
damaged.
here is the code:
OPCPackage opcpackage = OPCPackage.open(file.getAbsolutePath());
POIXMLProperties props = new POIXMLProperties(opcpackage);
org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperty
property = props.getCustomProperties().getUnderlyingProperties()
.addNewProperty();
property.setName("FileID");
property.setI4(123);
// props.commit();
XSSFWorkbook workbook = new XSSFWorkbook(opcpackage);
FileOutputStream out = new FileOutputStream(file);
workbook.write(out);
opcpackage.close();
out.close();
thanks
waldek
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]