Binding XML to an Excel with an XML Source
Posted: Wed Oct 21, 2020 8:27 pm
Hi All,
We are currently using the Docx4j for binding an XML into a word file with an XLM Source. Attached a code snippet for reference.
We are trying to achieve this same behavior with an Excel file. Attached a code snippet for reference
But is shows an error when binding an xml to an excel file.
Can you provide a documentation or other forums that is related to this topic?
Also, is this scenario doable in the docx4j?
Regards,
Sandy
We are currently using the Docx4j for binding an XML into a word file with an XLM Source. Attached a code snippet for reference.
- Code: Select all
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(templateStream);
Docx4J.bind(wordMLPackage, xmlDocument, Docx4J.FLAG_BIND_INSERT_XML);
We are trying to achieve this same behavior with an Excel file. Attached a code snippet for reference
- Code: Select all
SpreadsheetMLPackage spreadsheetMLPackage = SpreadsheetMLPackage.load(file);
Docx4J.bind(spreadsheetMLPackage, xmlDocument, Docx4J.FLAG_BIND_INSERT_XML);
But is shows an error when binding an xml to an excel file.
Can you provide a documentation or other forums that is related to this topic?
Also, is this scenario doable in the docx4j?
Regards,
Sandy