in reply to Formatting Excel cell using Perl

Kanji has an excellent point.

i believe something like this will do it... as long as you save as an excel file.

$Sheet->Range($range)->{HorizontalAlignment} = xlHAlignCenter;

i stole this snippet from cacharbe's great tutorial you'll find at Using Win32::OLE and Excel - Tips and Tricks

~Particle *accelerates*

Replies are listed 'Best First'.
Re: Re: Formatting Excel cell using Perl
by arajani (Novice) on May 07, 2002 at 16:30 UTC
    Hi Kanji & Particle,
    Thank you guys for the prompt reply. It did offer me good insight 
    into the way things happening. As Particle mentioned I able to
    align in Excel but in CSV that should not matter.

    Thanks,
    Raj.
      I've found that if I'm writing a script to generate an Excel-compatible spreadsheet with formatting, it's often easiest to generate an HTML table. HTML contains all of the formatting markup you could ever need, and Excel is smart enough to parse in the table structure and interpret it as spreadsheet cells.

      This may not help you with your current question, but for others that happen upon this thread, it might.