{"id":277,"date":"2011-06-21T12:13:55","date_gmt":"2011-06-21T12:13:55","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=277"},"modified":"2011-06-21T12:15:21","modified_gmt":"2011-06-21T12:15:21","slug":"python-excel-cell-background-color","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/python-excel-cell-background-color\/","title":{"rendered":"Python-Excel Cell Background Color"},"content":{"rendered":"<p>If you&#39;ve never used <a class=\"target-blank\" href=\"http:\/\/www.python-excel.org\/\">Python-Excel<\/a> before, I can introduce it in a couple words &#8211; &quot;Excellent and easy to use library for generating Excel spreadsheets from Python&quot;.<\/p>\n<p>If you are familiar and have used it in the past, you may have, at some point been frustrated with creating a background color for a given cell.<\/p>\n<p>This is probably the most counter-intuitive part about Python-Excel.<\/p>\n<p>If you are using EasyXF for your styling (highly recommended), a yellow background-color can be applied with the following example:<\/p>\n<p><code>nonZeroItemStyle = easyxf(&quot;&quot;&quot;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp; font:<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name Arial,<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; height 200;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp; pattern:<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pattern solid, <br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fore_colour yellow;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;) <\/p>\n<p>\t<\/code><\/p>\n<p>Items of note:<\/p>\n<ol>\n<li>Be sure to specify <em>pattern solid<\/em>.<\/li>\n<li>The counter-intuitive part &#8211; use the <em>fore_colour<\/em> style, as opposed to back_colour.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>If you&#39;ve never used Python-Excel before, I can introduce it in a couple words &#8211; &quot;Excellent and easy to use library for generating Excel spreadsheets&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[77,97],"tags":[98],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/277"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=277"}],"version-history":[{"count":2,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/277\/revisions"}],"predecessor-version":[{"id":279,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/277\/revisions\/279"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}