I sent in a note to the author, as I believe it's a bug within the module code, but I
thought just for thoroughness, I should also send a note in here and make sure it's
not a problem with my code. (my order of doing this is prolly wrong, too, but that's
for another thread ;))
I'm using the standard example code from its documentation, with a few minor tweaks:
# now we open/parse the Excel file
my $oExcel = new Spreadsheet::ParseExcel;
#1.1 Normal Excel97
my $oBook = $oExcel->Parse($tmpFile);
my($iR, $iC, $oWkS, $oWkC);
#print "FILE :", $oBook->{File} , "<P>\n" if $DEBUGGING;
#print "COUNT :", $oBook->{SheetCount} , "<P>\n" if $DEBUGGING;
#print "AUTHOR:", $oBook->{Author} , "<P>\n" if $DEBUGGING;
$oWkS = $oBook->{Worksheet}[0];
print "--------- SHEET:", $oWkS->{Name}, "<P>\n" if $DEBUGGING;
for(my $iR = $oWkS->{MinRow} ;
defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) {
my @rowValues = ();
for(my $iC = $oWkS->{MinCol} ;
defined $oWkS->{MaxCol} && $iC <= $oWkS->{MaxCol} ; $iC++) {
$oWkC = $oWkS->{Cells}[$iR][$iC];
my ($tempValue) = ($oWkC && $oWkC->Value ne '') ? $oWkC->Value :
'BLANK_AND_IGNORE';
print "TEMPVALUE = $tempValue<BR>\n" if $DEBUGGING;
push (@rowValues, $tempValue);
}
processRow (@rowValues);
}
}
Now if the Excel file has a cell whose value contains a comma, I receive two cells
instead of one. So if the cell contained "Perl, Excel", the TEMPVALUE output would be:
TEMPVALUE = Perl
TEMPVALUE = Excel
Any thoughts/ideas?
Thanks in advance!
Jason