V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
maryxmas
V2EX  ›  Python

求助:关于 xlwings 提取 excel 单元格内所有文字的颜色!

  •  
  •   maryxmas · 2019-08-28 20:16:30 +08:00 · 1721 次点击
    这是一个创建于 1709 天前的主题,其中的信息可能已经有所发展或是发生改变。
    最近在处理一个 xls 文件,加密了。
    用 xlwings 可以读取。

    现在我需要提取这个 excel 文件,range('A6')里所有文字的颜色。
    这一个 cell 里,会有多个字符串,每个字符串会是黑色或者蓝色,需要提取每一个字符串对应的颜色。。

    比如:
    range('A6')里的字符串是:‘ 05/01/2018----06/01/2018 (space) 09/02/2018----11/02/2018 ’
    '05/01/2018----06/01/2018'字体是黑色的,'09/02/2018----11/02/2018 ’字体是蓝色的。

    怎么操作能得到输出为:
    ['05/01/2018','06/01/2018','Black']
    ['09/02/2018','11/02/2018','Blue']
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2468 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 14:32 · PVG 22:32 · LAX 07:32 · JFK 10:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.