Convert doc file to html using Apache Poi

I am working on an android application in which I need to convert MS Office files to HTML using Apache Poi. So far, I can convert .xlsx to htm using the following Source project -

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

I see that the org.apache.poi.hwpf.converter package has a WordToHtmlConverter class that can convert the .doc file to its main method, since its main() method takes the path of the input file and the path to the output file as an argument. But when I call the main WordToHtmlConverter method, it gives a classnotfound exception exception for java.rmi.unexpectedexception exception. There is no java.rmi.unexpectedexception class for android. How can I solve this problem. Any help or guidance would be appreciated.

+4
source share
1 answer

Have you tried Docx4j ? I do not know if this is the answer for you, because I just started working with it. (I came across your question as I looked at Stackoverflow to see if it used it to create HTML5, which I think should be fairly simple)

0
source

Source: https://habr.com/ru/post/1435641/


All Articles