转换doc文件使用Apache POI的HTML文件、doc、Apache、HTML

2023-09-08 08:57:25 作者:年轻不拽世界何以精彩

我工作的一个Android应用程序中,我需要转换MS Office文件使用Apache POI为HTML。 截至目前我能够使用下列项目源的.xlsx转换为HTM -

I am working on an android application in which i need to convert MS office files to HTML using Apache Poi. Till now i am able to convert .xlsx to htm using the following project Source-

http://display-msoffice-docs-android-with-apache-poi.google$c$c.com/svn/trunk/TestOfficeAndroid/

我可以看到,有一个 WordToHtmlConverter org.apache.poi.hwpf.converter 封装,可以在其主要方法转换.doc文件为的main()方法需要输入文件路径和输出文件的路径作为参数。 但是,当我调用WordToHtmlConverter的主要方法,它给ClassNotFound的异常例外 java.rmi.unexpectedexception 。 没有java.rmi.unexpectedexception类机器人。 我怎样才能解决这个问题。 任何帮助或指导将AP preciated。

i can see that there is a WordToHtmlConverter class in org.apache.poi.hwpf.converter package which can convert .doc file in its main method as its main() method takes the input file path and output file path as argument. But when i invoke the main method of WordToHtmlConverter, it gives classnotfound exception exception for java.rmi.unexpectedexception. There is no java.rmi.unexpectedexception class for android. How can i overcome this problem. Any help or guidance will be appreciated.

推荐答案

您是否尝试过 Docx4j ?我不知道这是否是你的答案,因为我才刚刚开始使用它。 (我碰到你的问题,我一直在寻找的#1,看看是否有人使用它来创建HTML5,我认为应该很容易被做)

Have you tried Docx4j? I don't know if it's the answer for you, because I've only just started working with it. (I came across your question as I was looking on Stackoverflow to see if anyone had been using it to create HTML5, which I think should be fairly easy to do)