opensagres / xdocreport

XDocReport means XML Document reporting. It's Java API to merge XML document created with MS Office (docx) or OpenOffice (odt), LibreOffice (odt) with a Java model to generate report and convert it if you need to another format (PDF, XHTML...).
https://github.com/opensagres/xdocreport
1.19k stars 369 forks source link

XSLX support #605

Open spyhunter99 opened 1 year ago

spyhunter99 commented 1 year ago

Adding xslx support doesn't look like it's too bad. I started working on this can got basic string replacement working. Currently working on looping situations to populate row/cell from a collection. Judging from the existing source code, i think i need a preprocessor to handle this case? Anyone knowledgeable in this area that could help?

From my basic tests, all content goes in the sharedStrings.xml file and it looks to be a 0 based index. Each sheet, then has a sheetData section, containing all the row data, with values pointing at the sharedStrings file. Does this sound right? Then I'd after to process the foreach/list directives to get the output into sharedStrings and new rows as appropriate in the sheetData. Am i on the right track for this or am i way off?

raydl007 commented 1 year ago

sorry,i cannt answer your questions,but ,i support you ~

mwildam commented 8 months ago

A workaround would be to use JXLS (https://jxls.sourceforge.net/) for that kind of document to create. It is also very easy to use - similar approach as xDocReport.

SuperPat45 commented 2 months ago

An alternative good API is JETT https://jett.sourceforge.net/ The original developer stopped the development years ago, so you can use this fork which fixed bugs and updated dependencies: https://github.com/plan-vision/jett