Convert doc file to html using Apache Poi

一曲冷凌霜 提交于 2020-01-03 18:57:09

问题


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:


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)



来源:https://stackoverflow.com/questions/12542498/convert-doc-file-to-html-using-apache-poi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!