0

Best way to modify generated docx document with scripting language?

I thought about Python/Ruby or maybe something from MS --- hmmm VB.Script? PowerShell?

I don't want to do that in MS's tech. If its really super easy with Microsoft's technologies, then ok, I could try, but if not, Python/Ruby would be better.

Pandoc gives me some errors during conversion docx->*, and the other way around (simple.md -> *.docx), the output is unreadable in MS Word 2013 (file corrupted or something like that).

4

1 回答 1

0

这里有一个用于本地创建和操作 docx 文件的 python

就我个人而言,我会选择另一种非保护性格式,例如 rst 或 latex,然后使用 pandoc 转换为其他需要的格式。请记住,.docx 格式适用于 MS-Word,并且仅适用于最新版本。我已经使用 pandoc 从 .rst 文件成功转换为 docx、html 和 pdf。

您可能还想查看 docutils 以了解生成文档的纯 Python 方式。

于 2013-09-26T05:13:53.430 回答