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-
我正在开发一个Android应用程序,我需要使用Apache Poi将MS office文件转换为HTML。直到现在我能够使用以下项目将.xlsx转换为htm -
http://display-msoffice-docs-android-with-apache-poi.googlecode.com/svn/trunk/TestOfficeAndroid/
http://display-msoffice-docs-android-with-apache-poi.googlecode.com/svn/trunk/TestOfficeAndroid/
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.
我可以看到org.apache.poi.hwpf.converter包中有一个WordToHtmlConverter类,它可以在其main方法中转换.doc文件,因为它的main()方法将输入文件路径和输出文件路径作为参数。但是当我调用WordToHtmlConverter的main方法时,它为java.rmi.unexpectedexception提供了classnotfound异常异常。 android没有java.rmi.unexpectedexception类。我怎样才能克服这个问题。任何帮助或指导将不胜感激。
1 个解决方案
#1
0
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 * to see if anyone had been using it to create HTML5, which I think should be fairly easy to do)
你试过Docx4j吗?我不知道这是不是你的答案,因为我刚刚开始使用它。 (当我在*上查看是否有人使用它来创建HTML5时,我遇到了你的问题,我认为这应该相当容易)
#1
0
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 * to see if anyone had been using it to create HTML5, which I think should be fairly easy to do)
你试过Docx4j吗?我不知道这是不是你的答案,因为我刚刚开始使用它。 (当我在*上查看是否有人使用它来创建HTML5时,我遇到了你的问题,我认为这应该相当容易)