Keen的博客

记录所思、所想、所遇

欢迎来到我的个人站~


CentOS下doc转docx

参考

https://stackoverflow.com/questions/52277264/convert-doc-to-docx-using-soffice-not-working

安装

yum remove openoffice* libreoffice*
yum install libreoffice*

执行命令

soffice --headless --convert-to docx teste.doc

python调用

#!/usr/bin/env python
# coding:utf-8
import subprocess
output = subprocess.check_output(["soffice","--headless","--invisible","--convert-to","docx","/home/requiem/workspace/python3/test.doc","--outdir","/home/requiem/workspace/python3/"])

打赏一个呗

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码支持
扫码打赏,你说多少就多少