So I've got all these Excel spreadsheet that I don't want to manually enter into a DB one at a time, so I got this nifty module called Spreadsheet::ParseExcel and started learning it.
However, when I do this:
for (my $row = 0; $row <= $tdb->{MaxRow}; $row++) {
my $cell = $tdb->{Cells}[$row][0];
my $value = $cell->Value;
print FH "$value\n";
}
I'm getting this message:
Can't call method "Value" on an undefined value at spacebase.pl line 36.
MaxRow is giving back a value higher than the actual maximum row value. Now, I've come up with a workaround--I'll just wrap my $value = $cell->Value; in an eval and use that to terminate the loop, which is a good idea for other reasons--but I'm curious whether anyone else has experience with this module and knows what might be going on. My guess is that the module is returning a valid number and my spreadsheet is goofy--any other thoughts?
adamsj
They laughed at Joan of Arc, but she went right ahead and built it. --Gracie Allen