小编yis*_*sus的帖子

无法使用 Python 将 DOCX 转换为 HTML

我已经用猛犸象试过了:

import mammoth

result = mammoth.convert_to_html("MyDocument.docx")
print (result.value)
Run Code Online (Sandbox Code Playgroud)

我没有得到 HTML,但是这个奇怪的代码:

kbW7yqZoo4h9pYM6yBxX1QFx2pCoPYflXfieIPbtqpT913Vk7OzcZdEk3eO7TbWjvZNTGilsfmRrPwDvB[...]
Run Code Online (Sandbox Code Playgroud)

我也尝试过使用 docx2html,但我无法安装它。当我运行时,pip install docx2html我收到此错误:

SyntaxError: Missing parentheses in call to 'print'
Run Code Online (Sandbox Code Playgroud)

html ms-word converter python-3.x mammoth

2
推荐指数
1
解决办法
5127
查看次数

标签 统计

converter ×1

html ×1

mammoth ×1

ms-word ×1

python-3.x ×1