Tuesday, 15 February 2011

python - How to set color of text using xlwt -


I can not find a document about how to set the color of text. How will the following be done in axle vault?

  style = xlwt.XFStyle () #Bold font = xlwt.Font () font.bold = True style.font = font # Background color pattern = Xlwt.Pattern () pattern.pattern = Xlwt.Pattern.SOLID_PATTERN Pattern. Pattern_fore_colour = xlwt.Style.colour_map ['pale_blue'] style pattern = pattern # color color ???   

Another way I have tried, where I am able to set the font color, but not the background color:

  style = xlwt .easyxf ('font: bold1, color red;')    

This is the job :

  style = xlwt.easyxf ('Pattern: Pattern Solid, Edge Light_blue;' 'Font: Color White, Bold True;')    

No comments:

Post a Comment