转换doc文件使用Apache POI的HTML [英] Convert doc file to html using Apache Poi

查看:145
本文介绍了转换doc文件使用Apache POI的HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个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-

<一个href="http://display-msoffice-docs-android-with-apache-poi.google$c$c.com/svn/trunk/TestOfficeAndroid/" rel="nofollow">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)

这篇关于转换doc文件使用Apache POI的HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆