Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2016-12-08 07:39 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (135 votes). Check out past polls.