Best way to export html to Word without having MS Word installed?

后端 未结 11 2297
执笔经年
执笔经年 2020-12-10 03:13

Is there a way to export a simple HTML page to Word (.doc format, not .docx) without having Microsoft Word installed?

11条回答
  •  甜味超标
    2020-12-10 03:22

    If you are working in Java, you can convert HTML to real docx content with code I released in docx4j 2.8.0. I say "real", because the alternative is to create an HTML altChunk, which relies on Word to do the actual conversion (when the document is first opened).

    See the various samples prefixed ConvertInXHTML. The import process expects well formed XML, so you might have to tidy it first.

提交回复
热议问题