Solved

spreadsheet PERL - color a cell

Posted on 2007-11-16
3
1,528 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
A short article about problems I had with the new location API and permissions in Marshmallow
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

759 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now