use Spreadsheet::Read; use Spreadsheet::ParseExcel; my $InputFile; Win32::LongPath::openL (\$InputFileReadable, '<', $InputFile); #opening XLS my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse($InputFileReadable); if ( defined $workbook ) { print "I could read the XLS file\n"; } #opening ODS my $workbook2 = ReadData ($InputFileReadable); if ( defined $workbook2 ) { print "I could read the ODS file\n"; }