Solved

spreadsheet PERL - color a cell

Posted on 2007-11-16
3
1,555 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this post we will learn different types of Android Layout and some basics of an Android App.

734 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