I use xlwt Python library to write data in excel workbook.
And now I have some problems with adding background color to excel cell.
For example I have next color in RGB(10,20,30), what is the easiest way to do this? Is there any way to set this color to cell?
I found only this post which similar with my problem.
i had this problem and I did a lot of searching
at last i found a proper and good solution in : source of solution
it work very good!
just add this class to your project and set excel colors :
the source of this code is : http://www.archivum.info/python-excel@googlegroups.com/2012-09/00014/Re-%28pyxl%29-Re-Background-with-any-rgb-value.htmle
In this example, I have shown how to set background color for cells, you can run it for result:
I recommend to use XlsxWriter module, has awesome features too http://xlsxwriter.readthedocs.io/