I've been injecting custom document properties with POI in both OOXML and OLE files for about 4 months now covering a very large number of documents. I do have one customer complaining when they open my meta-data injected version of their file that Excel complains about a missing drawing part. The recovery log is: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"> <logFileName>error027960_01.xml</logFileName> <summary>Errors were detected in file 'Z:\Downloads\bad.xlsx'</summary> - <removedParts summary="Following is a list of removed parts:"> <removedPart>Removed Part: /xl/drawings/drawing1.xml part. (Drawing shape)</removedPart> </removedParts> </recoveryLog> Extracting the original file and the one I modified (only the custom document properties) and diff I get the attached diff. |
diff_good_bad.diff
Description: Binary data
Largely the differences are just formatting changes ... POI making the XML pretty print. POI drops the standalone="yes" attribute in the XML declaration ... that shouldn't be a big deal. The thing that jumps out at me is that in xl/drawings/_rels/drawing1.xml.rels, I'm losing relationship rId1 (<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="#'Instructions (Text)'!B21"/></Relationships>) in version that POI saves to disk. Does anyone have any suggestions or seen anything like this before? I started this project back at the beginning of the year with an early 3.7 snapshot, migrated to beta2 and now to beta3 which all exhibit the same issues. |
