Page 1 of 1

XSLT Template for Excel OO XML to Apache FO xmlTransformatio

PostPosted: Tue Dec 18, 2012 8:48 pm
by rajesh.giriyappa
HI,

I was looking for exporting the Excel file to the PDF using the Docx4j but i found there is no XSLT Template created for the Excel xml to the FOP XML for PDF Creationg ,if anybody attempted in doing so please let us know share with us.We are in process of making excel to pdf conversion using the open source solutions like FOP|POI| or and DOCx4j.
I See this Functionality is not supported via docx4j yet, If Some one writes the XSLT Template for this than it will be a starter for exporting the excel to pdf.

Currently there is no good opensource solution which does this. there are few paid version solutions which will do this :)

Re: XSLT Template for Excel OO XML to Apache FO xmlTransform

PostPosted: Fri Dec 21, 2012 12:07 pm
by jason
You could write an template which transforms a worksheet to XSL FO, which would work with either docx4j/xlsx4j, or POI.

Transforming a worksheet containing basic data is probably straightforward enough (although even a minimal implementation is likely to have to support references to sharedStrings).

Supporting the full range of XLSX features is of course much more complex.

For docx PDF output, docx4j uses its Java model to interpret formatting (ie it uses Xalan Java extension functions).

You're likely to want to do the same thing for xlsx FO output, and it is at that point that your implementation would become dependent on docx4j or POI, unless of course you wrote to an interface which either could implement.

Sparked by Android considerations, docx4j has started implementing HTML and PDF output in a way which doesn't require XSLT. If I were to write an XLSX to FO implementation, I would write it using Java only (ie no XSLT).