在pandas read_excel中获取Excell单元格背景颜色?

我有一个带有背景颜色的单元格的Excel文件。 我正在用read_excel将该文件读入pandas 。 有没有办法获得单元格的背景颜色?

按照Mark的build议,把它强行通过xlrd

 from xlrd import open_workbook wb = open_workbook('wb.xls', formatting_info=True) sheet = wb.sheet_by_name("mysheet") #create empy colormask matrix bgcol=np.zeros([sheet.nrows,sheet.ncols]) #cycle through all cells to get colors for row in range(sheet.nrows): for column in range(sheet.ncols): cell = sheet.cell(row, column) fmt = wb.xf_list[cell.xf_index] bgcol[row,column]=fmt.background.background_colour_index #return pandas mask of colors colormask=pd.DataFrame(bgcol) 

然而,pandas必须有一个更好的方式直接…