Actually I am using xlrd module 0.8 version, but I don’t know how to read cell properties like background color, font, and whether cell is locked.
I tried to use
import xlrd
wb = xlrd.open_workbook(...)
sh = wb.sheet_by_index(...)
sh.sh._cell_xf_indexes(2, 2)
It raises an error saying formatting information needs to be set while reading wb, but if I had that parameter then it shows it is still not implemented.
Is there another module or how can this module itself be made to read cell properties?
The following works for me, using xlrd version 0.7.6:
fmtis an instance of the XF class; see https://secure.simplistix.co.uk/svn/xlrd/trunk/xlrd/doc/xlrd.html#formatting.XF-classThe
dump()method prints all the information about the format. Here’s the output of the above code:Some of those values are indices into lists on the workbook
wb. For example,fmt.font_indexis 72, andwb.font_list[72]is an instance of theFontclass (https://secure.simplistix.co.uk/svn/xlrd/trunk/xlrd/doc/xlrd.html#formatting.Font-class).