Hi All
I have the following problem. When I try to open an Excel xlsx file that is actually an old .xls type file with the perl module Spreadsheet::ParseXLSX my program crashes with an error. I have tried putting the command in an eval statement as below but this does not work. Is there any way to trap the error?
$FileToOpen=myfile.xlsx; my $parser=Spreadsheet::ParseXLSX->new(); my $xxx=eval{$parser->parse($FileToOpen)};When I run the code I get a load of errors from the $parse statement followed by the result of $xxx is:Spreadsheet::ParseExcel::Workbook=HASH(0x5c05968)
Am I using eval incorrectly or is there something else I am missing?
Many thanks in advance for any help with this.
In reply to trap error from parsexlsx by gauss76
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |