you misunderstood my second bullet point. The modules try to be "exchangeable", so it should be possible to write something like
my $excel_obj;
if ($ext eq ".xls") {
$excel_obj = Spreadsheet::ParseExcel->new();
} elsif ($ext eq ".xlsx") {
$excel_obj = Spreadsheet::ParseXLSX->new();
} elsif ($ext eq ".ods") {
$excel_obj = Spreadsheet::ReadSXC->new();
} else {
die "Extension $ext not (yet) supported...";
}
my $workbook = $excel_obj->Parse( ... );
and have just one loop through the spreadsheet, instead of one for each file type.
That said, looks like someone (Tux) already took a similiar approach and wrote Spreadsheet::Read
|