html - 如何将HTML文件转换成word?

标签 html ms-word

<分区>

我需要将内存中的 HTML 文档保存为 Word .DOC 文件。

任何人都可以给我一些我可以用来执行此操作的封闭源代码库和开源库的链接吗?

此外,我应该编辑此问题以添加我正在使用的语言以缩小选择范围。

最佳答案

尝试使用 pandoc

pandoc -f html -t docx -o output.docx input.html

If the input or output format is not specified explicitly, pandoc will attempt to guess it from the extensions of the input and output filenames.
— pandoc manual

所以你甚至可以使用

pandoc -o output.docx input.html

关于html - 如何将HTML文件转换成word?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1624485/

相关文章:

html - Bootstrap 元素在虚拟服务器上不起作用

python - 如何在 Windows 中运行 python cgi Web 服务器

excel - "Nullify"在文档中粘贴Excel表格之前的Word样式

c# - 我是否必须关闭 Word Interop 应用程序?

ms-word - Microsoft 公式 3.0 中实数集的 "R"符号

vba - 使用 VBA 查找 Office 2010 Word 文档的大纲级别

html - Firefox 不呈现 <tr> 圆 Angular 边框,尽管计算了 border-radius 值

javascript - jQuery 选择器以前缀开头的任何类名(存在多个)为目标?

c# - 用c#替换word文档中的占位符

html - 移动版 Safari Z-Index 不工作