I'm still working on PPTX document copy, and I have troubles with charts.
It works fine when I copy a Chart part, but when I try to add an embedded XLSX object, I see following line in the log:
- Code: Select all
org.docx4j.openpackaging.parts.relationships.RelationshipsPart - True - will delete relationship with target ../embeddings/Microsoft_Office_Excel_Worksheet1.xlsx
It comes right after doing this:
- Code: Select all
chartPart.addTargetPart(xlsxPart);
SaveToZipFile throws an Exception:
- Code: Select all
org.docx4j.openpackaging.exceptions.Docx4JException: Failed to add parts from relationships
at org.docx4j.openpackaging.io.SaveToZipFile.addPartsFromRelationships(SaveToZipFile.java:334)
at org.docx4j.openpackaging.io.SaveToZipFile.save(SaveToZipFile.java:159)
at org.docx4j.openpackaging.io.SaveToZipFile.save(SaveToZipFile.java:88)
...