开发者

Reading background color of a cell of an excel sheet from python?

开发者 https://www.devze.com 2023-03-21 00:54 出处:网络
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 exce

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.

0

精彩评论

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

关注公众号