Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Output to an Excel Document

by OM_Zen (Scribe)
on Mar 12, 2003 at 15:01 UTC ( #242374=note: print w/replies, xml ) Need Help??

in reply to Output to an Excel Document

Hi ,

The xls spreadsheets can be generated using the distribution Spreadsheet::WriteExcel like as in here

use Spreadsheet::WriteExcel; # open the text one in here my $Files = shift; my $FilesExcel =$Files . "\.xls"; $FilesExcel =~ s/\.txt//g; my $WorkbookForFiles = Spreadsheet::WriteExcel->new($FilesExcel); my $WorksheetForFiles = $WorkbookForFiles->addworksheet('FTP_Outg +oing_Alert_Tracking_ Report'); # Change the permission to 770 however you have to my $format_for_WorkbookFiles= $WorkbookForFiles->addformat(); $format_for_WorkbookFiles->set_bold(1); $format_for_WorkbookFiles->set_color('black'); $format_for_WorkbookFiles->set_align('center'); $WorksheetForFiles->set_column(0,20,20); open(fh , "<$Files"); my $rownum = 0; my @fields; my $columnum; while (<fh>){ $columnnum = 0; chomp; @fields = split('\|',$_); $WorksheetForFiles->activate(); foreach my $Fields(@fields){ $WorksheetForFiles->write($rownum ,$columnnum,$Fields,$for +mat_for_WorkbookFile s); $columnnum++; } $rownum++; } }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://242374]
[Cow1337killr]: Welcome, jchain.
[Cow1337killr]: Welcome back, Beaker.

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2017-02-28 14:52 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (402 votes). Check out past polls.