jinhuang1992 has asked for the wisdom of the Perl Monks concerning the following question:

I'm very new to PERL with Win32::OLE & Microsoft Excel. Does anyone know how to write a few statements to align numbers & text in a column to the right? Thanks. Before in a column ==>

Amount

23.25

-2.10

none

6666

7525

Output should look like ==>

Amount

23.25

-2.10

none

6666

7525

for the size and bold of numbers and text in column A, I can write my $font = $sheet->{"A:A")->{Font}; $font->{Size} = 14; $font->{Bold} = 1; .... How do I align the numbers and text to the right? Thanks.
  • Comment on Align numbers & text in a column to the right

Replies are listed 'Best First'.
Re: Align numbers in a column to the right
by SheridanCat (Pilgrim) on Jan 26, 2007 at 16:27 UTC
    I haven't bothered to fiddle with OLE to do Excel work in the past. I've preferred Spreadsheet::WriteExcel. It has worked pretty well. There's justification functions that should help you out.

    Edited to fix stupid typos and syntax.

      It's not what I want from Spreadsheet::WriteExcel. But, thanks, anyway.
Re: Align numbers in a column to the right
by davorg (Chancellor) on Jan 26, 2007 at 16:24 UTC