使用java将HTML页面转换为MS字 [英] Convert HTML page into MS word using java
问题描述
我想将HTML页面转换为MS word。
我想知道哪些API会有帮助,并且还有其他选项可以做到这一点。
整个页面将被转换为.doc(例如,如果html页面中有一个表格,则必须在word doc中创建一个类似的表格)
请帮助。
查看Apache POI库... http://poi.apache.org/ 它具有对所有Office产品的读写支持:
总之,您可以使用Java读取和写入MS Excel文件。在
中,您可以使用
Java来读写MS Word和MS PowerPoint文件。
使用它对于Excel来说非常简单,并且非常容易使用。
注意... Apache POI库不会将HTML转换为DOC(x),但它确实可以让您写格式 - 即你必须自己做格式化
I want to convert a HTML page into MS word. I want to know what API's will be helpful and also if there is any other option to do the same. The entire page is to be converted into .doc (eg. If there is a table in the html page, a similar table must be created in the word doc) Please help.
Have a look into the Apache POI library ... http://poi.apache.org/ it has read / write support for all of the Office products, from the site :
In short, you can read and write MS Excel files using Java. In addition, you can read and write MS Word and MS PowerPoint files using Java.
Used it a lot for Excel and very simple to pick up and use.
Note ... the Apache POI library doesnt convert HTML to DOC(x) but it does allow you to write in the format - ie you would have to do the formatting yourself
这篇关于使用java将HTML页面转换为MS字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!