Create a conditional format using the set_num_format()method, this enables you to distinguish between different cells values by assigning color backgrounds. I heard a lot of Monks mention things about WIN32::OLE module, I believe it has to be a strong one, so better try it out and learn it, I would want to learn it too....SpreadSheet::WriteExcel has some disadvantages I was not aware of until I have tried doing stuff and then crashing on the discovery that this module could not well do it satisfactorily or even not do it at all...here is a link to some more examples on SpreadSheet::WriteExcel that you might find useful http://www.koders.com/perl/fid2656ED1AA9FDA418F78129684CD3956AA785DC9D.aspx
$f_change->set_num_format('[color 10]0.00%; [Red]-0.00%;[Orange]0.0%') +; $worksheet->write(3,3,0,$f_change); $worksheet->write(2,3,-0.015,$f_change); worksheet->write(1,3,0.085,$f_change);
using this set_num_format can allow you to give colors to positive percentage ranges, negative percentage ranges and zero...I have been there before, so this code, extracted from a program I wrote does not have bugs in it.
Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind

In reply to Re: Spreadsheet::WriteExcel setting color in drop-down box by biohisham
in thread Spreadsheet::WriteExcel setting color in drop-down box by sushi2k

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.