是否有能够从DOCX,XLSX等Office XML文档生成XSL

编程入门 行业动态 更新时间:2024-10-28 12:23:05
是否有能够从DOCX,XLSX等Office XML文档生成XSL-FO的库?(Is there a library capable of generating XSL-FO from Office XML documents like DOCX, XLSX?)

有谁知道一个能够从Microsoft Office Open XML文件生成XSL-FO的库,例如Word DOCX或Excel XLSX?

鉴于这些Office文件基本上是ZIP文件中的XML,我认为通过应用适当的XSLT转换从它们生成XSL-FO非常简单 - 尽管编写XSLT需要一些时间。 但是,如果我怀疑这是一个简单的话,那么也许有人编写了一个可以执行此操作的库,或者发布了执行此操作的XSLT转换。

此Microsoft MSDN库文章包含使用Word 2003 WordprocessingML文件创建XSL-FO的示例,但我还没有看到任何更新的Open XML格式。

有没有人有建议? Java库是更可取的,但任何事情都会被考虑。

Does anyone know of a library that is capable of generating XSL-FO from a Microsoft Office Open XML file, such as a Word DOCX or an Excel XLSX?

Given that these Office files are basically XML in a ZIP file, I figure it would be pretty straightforward to generate XSL-FO from them by applying appropriate XSLT transformations — though writing the XSLT would take some time. But if it is a straightforward as I suspect, then maybe someone has written a library that does it, or released XSLT transformations that do it.

This Microsoft MSDN library article contains an example of creating XSL-FO with Word 2003 WordprocessingML files, but I haven't seen anything for the newer Open XML format.

Does anyone have suggestions? A Java library would be preferable, but anything would be considered.

最满意答案

对于docx, docx4j对此有所支持; 从v3.3.0开始它就在一个单独的项目中https://github.com/plutext/docx4j-export-FO

它使用XSLT创建XSL-FO。 XSLT使用Java扩展函数调用docx4j方法来完成大部分工作,使XSLT本身保持相对简单。

docx4j使用FOP将XSL FO转换为PDF。

docx4j支持xlsx,但没有从XLSX到XSL FO的内置导出。

docx4j has support for this, for docx; since v3.3.0 it is in a separate project https://github.com/plutext/docx4j-export-FO

It uses XSLT to create the XSL-FO. The XSLT uses Java extension functions to invoke docx4j methods to do much of the work, keeping the XSLT itself relatively simple.

docx4j uses FOP to convert XSL FO to PDF.

docx4j has support for xlsx, but no built in export from XLSX to XSL FO.

更多推荐

XSL-FO,XML,XSLT,电脑培训,计算机培训,IT培训"/> <meta name="description&q

本文发布于:2023-08-07 19:42:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1465699.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文档   XLSX   DOCX   Office   XSL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!