innuendo98 has asked for the wisdom of the Perl Monks concerning the following question:
If you want to see the file I'm working on send me your email if you want to try it out... nothing in the file seems to be out of the ordinary for the script not being able to read it.#!/usr/bin/perl -w use Spreadsheet::BasicRead; if (!defined($ARGV[0]) or !defined($ARGV[1])) { die "\n\n** ** W A R N I N G ** **\nUSE: aes_rateport_pars +e.pl INFILEPATH OUTFILEPATH \n\n"; } #delimiter: my $delim = "\ "; my $in_file = $ARGV[0]; my $out_file = $ARGV[1]; my $line; open (OUTFILEHANDLE, ">$out_file") or die "Could not open '$out_file': + $!"; my $ss = new Spreadsheet::BasicRead($in_file) or die "Could not open ' +$in_file': $!"; my $maxSheet = $ss->numSheets(); $ss->setCurrentSheetNum($maxSheet-1); #$ss->setHeadingRow(6); #$ss->skipHeadings(6); $ss->setRow(7); print $ss->currentSheetName() . " <- Sheet Name\n"; print $ss->getRowNumber() . " <- Row Number\n"; #print $ss->cellValue(8, 12) . " <- Cell value doesn't return anythin +g !!! \n"; my $row = 0; while (my $data = $ss->getNextRow()) { next if ( @$data[2] eq ""); $row++; print join('|', $row, @$data), "\n"; } close(OUTFILEHANDLE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with Spreadsheet::basicRead
by sub_chick (Hermit) on Jun 20, 2008 at 03:45 UTC |