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 information 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With