推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
alfer
V2EX  ›  Python

python 解析 word 的 doc 格式,有什么好办法?

  •  
  •   alfer · Oct 21, 2016 · 6627 views
    This topic created in 3666 days ago, the information mentioned may be changed or developed.

    方案一: python 解析 docx 格式支持良好但对 doc 格式支持很差,故希望 doc 转为 docx 格式,有什么好办法? 方案二:将 doc 转为 html 格式,然后解析 html ,测试后发现如果数据量大了支持也不好 大家有什么好办法吗?

    注:有近 1w 个*.doc 文档,每个文档 100Mz 左右

    6 replies  •  2016-11-01 09:26:10 +08:00
    vicalloy
    vicalloy
    Oct 21, 2016
    1
    是需要提取 doc 里的内容?
    https://github.com/dagwieers/unoconv 用这个可以将 doc 转成 html 或 docx 。
    alfer
    alfer
    OP
    Oct 21, 2016
    2
    @vicalloy 提取 word 中的表格
    dinosjk
    dinosjk
    Oct 21, 2016
    3
    py 通过 office 之类的软件打开 doc ,转换成 docx ,然后自由发挥。这样呢?
    dinosjk
    dinosjk
    Oct 21, 2016
    4
    之前转换了 2000 多个 doc 入 pdf 用的这种方式
    xuboying
    xuboying
    Oct 22, 2016 via iPhone
    5
    这种特殊需求还不如现学 VBA 三下五除二,别信 Python 的唯有唯一正确解的梦话。 Perler 说过黑猫白猫,都是好猫
    zungmou
    zungmou
    Nov 1, 2016 via iPhone
    6
    用 c#调用 office 接口操作 word 进行解析,应该很容易。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2029 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 16:30 · PVG 00:30 · LAX 08:30 · JFK 11:30
    ♥ Do have faith in what you're doing.