开发者

openpyxl cell style not reporting correctly

开发者 https://www.devze.com 2023-02-22 03:09 出处:网络
Using the python library openpyxl I am reading an XLSX file created in excel 2007. it is empty apart from cell A1 which is coloured yellow and has the value \"test\" written in it. I can easily retrie

Using the python library openpyxl I am reading an XLSX file created in excel 2007. it is empty apart from cell A1 which is coloured yellow and has the value "test" written in it. I can easily retrieve the value from that cell, however when I attempt to determine the fill colour I get the following results:

this_sheet.cell("A1").style.fill.start_color 

returns "FFFFFF"

this_sheet.cell("A1").style.fill.end_color 

returns "FF0000"

Testing this on other blank cells I get exactly the same results, and trying to retrieve the font style informat开发者_如何转开发ion keeps returning calibri size 11 (our system default).

Am I going about this all wrong? Is there an alternative method i should be using? Any help would be greatly appreciated.

Thanks!


Openpyxl is still in development, and styles are not yet completely implemented, thus you can encounter some issues here and there. Don't hesitate to open an issue on the project bug tracker if you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消