python 读excel中的sheet_Python使用一些背景颜色读取Excel工作表(xlsx)中的单元格?...

我正在尝试阅读excel表(xlsx),它使用背景颜色来区分值。

我尝试了以下库:大熊猫,没有找到任何选择阅读基于背景颜色的细胞。

xlrd。

import xlrd xlrd.open_workbook("filename.xlsx", formatting_info=True)

它给出错误:NotImplementedError:formatting_info = True尚未实现。StyleFrame(由DeepSpace建议:在excel表格中根据单元格颜色和文本颜色子集数据框)

from StyleFrame import StyleFrame, utils sf = StyleFrame.read_excel('filename.xlsx', read_style=True, use_openpyxl_styles=False)

它给出了错误:Traceback (most recent call last):

File "proj_path/read_excel.py", line 22, in

sf = StyleFrame.read_excel('filename.xlsx', read_style=True, use_openpyxl_styles=False)

File "C:\Anaconda\lib\site-packages\StyleFrame\deprecations.py", line 22, in inner

return func(*args, **kwargs)

File "C:\Anaconda\lib\site-packages\StyleFrame\style_frame.py", line 220, in read_excel

_read_style()

File "C:\Anaconda\lib\site-packages\StyleFrame\style_frame.py", line 209, in _read_style

read_comments and current_cell.comment)

File "C:\Anaconda\lib\site-packages\StyleFrame\styler.py", line 127, in from_openpyxl_style

font_color = theme_colors[openpyxl_style.font.color.theme]

TypeError: list indices must be integers or slices, not Integer

我们非常感谢任何帮助我改变方向的建议。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值