Update: here's something more specific. It will read a csv file and write it to an Excel file.use Spreadsheet::WriteExcel; $workbook = Spreadsheet::WriteExcel->new('sample.xls'); $worksheet = $workbook->add_worksheet('ws name'); $worksheet->write(0,0,'something in a1'); $workbook->close();
use IO::File; use Spreadsheet::WriteExcel; my $infile = IO::File->new("<infile.csv"); my $workbook = Spreadsheet::WriteExcel->new('output.xls'); my$worksheet = $workbook->add_worksheet('ws name'); my $row = 0; while (my $line = $infile->getline()) { chomp($line); my $record = [split ',', $line]; $worksheet->write_row($row,0, $record); $row++; } $infile->close(); $workbook->close();
In reply to Re: Exporting Data to and Excel file format
by mifflin
in thread Exporting Data to and Excel file format
by curtisb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |