Closed jferard closed 5 years ago
Code:
OdsFactory odsFactory = OdsFactory.create(); final AnonymousOdsFileWriter writer = odsFactory.createWriter(); final OdsDocument document = writer.document(); Table table = document.addTable("sheet"); TableRow row = table.getRow(0); TableCellWalker walker = row.getWalker(); walker.setColumnsSpanned(2); walker.next(); walker.setText(Text.content("A String")); writer.saveAs(new File("./generated_files", "test.ods"));
LO doesn't open the file:
Read Error. Format error discovered in the file in sub-document content.xml at 1,2650(row,col).
Content of the content.xml file is:
content.xml
... <table:table-row table:style-name="ro1"> <table:table-cell table:style-name="Default" table:number-columns-spanned="2"/> <table:covered-table-cell table:style-name="Default" office:value-type="string" office:string-value=""> <text:p>A String</text:p> </table:table-cell> </table:table-row> ...
A table:table-cell tag closes a table:covered-table-cell tag.
table:table-cell
table:covered-table-cell
Code:
LO doesn't open the file:
Content of the
content.xml
file is:A
table:table-cell
tag closes atable:covered-table-cell
tag.