Reading background color of a cell of an excel sheet from python?
I am working in python and using xlwt. I have got a sample excel sheet and have to generate same excel sheet from python. Now the problem is heading columns are highlighted using some color from excel colo开发者_JS百科r palette and I am not able to find the name of color. I need to generate exact copy of sample given to me. Is there any function in xlwt which let me read color of cell of one sheet and then put that color in my sheet?
Best you read the colours from the sample given to you with xlrd
.
If there are only a few different colours and they stay the same over time, you can also open the file in Excel and use a colour picker tool to get the RGB values of the relevant cells.
精彩评论