1.
XLRDError: Excel xlsx file; not supported
这是因为高版本xlrd不支持xlsx格式导致的,可以安装低版本
1 |
pip3 install xlrd==1.2.0 |
2.
NotImplementedError: formatting_info=True not yet implemented
这是因为使用 rich_text_runlist_map 时,不支持xlsx格式导致的,把xlsx另存为xls格式。
1 2 3 4 5 6 |
book = xlrd.open_workbook('/xxx.xls', formatting_info=True) sheet = book.sheet_by_index(0) cell_metas = sheet.rich_text_runlist_map.get((i, j)) if cell_metas: for offset_in_string, font_index in cell_metas: print(offset_in_string, font_index) |
声明
本文由崔维友 威格灵 cuiweiyou vigiles cuiweiyou 原创,转载请注明出处:http://www.gaohaiyan.com/3905.html
承接App定制、企业web站点、办公系统软件 设计开发,外包项目,毕设