in reply to Re: Spreadsheet Parsing problem
in thread Spreadsheet Parsing problem

I added a bindmode STDOUT
use strict; use warnings; use Spreadsheet::ParseExcel::Simple; use Spreadsheet::WriteExcel::Simple; binmode STDOUT; #IN my $file = 'infile.xls'; my $xls = Spreadsheet::ParseExcel::Simple->read($file); #OUT my $ss = Spreadsheet::WriteExcel::Simple->new(); my $count; foreach my $sheet ($xls->sheets) { while ($sheet->has_data) { #Reading my @idata = $sheet->next_row; my @odata = @idata; # Here I can manipulate the data #Writing $ss->write_row(\@odata); last if $count++ > 5; } } print $ss->data;
and ran
perl temp.pl >outfile.xls
and oufile.xls opened fine. I tried a several different versions of infile.xls with blank rows and such but it seemed to work fine.

--

flounder