in reply to Unable to use Spreadsheet::ExcelHashtable module
Your example code and error message don't seem to match. If parse_table was given "TestCase " the error should have said ERROR: No Cell found with <TestCase >....
Regardless, parse_table calls the internal function _search_var, passing your search term. Neither routine modifies the search term in any way. It then checks every cell for a match like this:
Note that if the cell has trailing white space then all white space is stripped from $val before comparing with your search term in $var. It can never find "TestCase ".if ( defined $cell ) { my $val = $cell->value; if ($val =~ /\s+$/ ) { $val =~ s/\s+//g; } if ( $val eq "$var") { return "$row $col"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unable to use Spreadsheet::ExcelHashtable module
by Anonymous Monk on Oct 25, 2011 at 06:24 UTC | |
by keszler (Priest) on Oct 25, 2011 at 11:28 UTC |