Convert doc file to html using Apache Poi

2019-06-26 08:59发布

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.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.

1条回答
成全新的幸福
2楼-- · 2019-06-26 10:00

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)

查看更多
登录 后发表回答