Solved

spreadsheet PERL - color a cell

Posted on 2007-11-16
3
1,550 Views
Last Modified: 2010-10-05
I am validating some data using PERL.  My output will be an excel spreadsheet, so while validating the data  I want to highlight the cells that have invalid values.  My question is how do I highlight the cell ?
0
Comment
Question by:cfhexcel
3 Comments
 
LVL 9

Expert Comment

by:Suhas .
ID: 20310305
To print words in color:
------------------
use Term::ANSIColor;
print color("red"), "Stop!\n", color("reset");
print color("green"), "Go!\n", color("reset");
0
 
LVL 39

Accepted Solution

by:
Adam314 earned 125 total points
ID: 20313246
Are you using Spreadsheet::WriteExcel?

If so, you define a format with:
    $format1 = $workbook->add_format(%props);

Then use that format in a cell with:
    $worksheet->write_string(1, 0, "Two", $format);

Details are available here:
http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.20/lib/Spreadsheet/WriteExcel.pm
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
A short article about a problem I had getting the GPS LocationListener working.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question