in reply to Re^5: string TRUE/FALSE getting converted to 1/0
in thread string TRUE/FALSE getting converted to 1/0

Thanks for your response Soonix. I have tried converting the XLSX to XLS and then to csv using this script and that is converting as intended. As for Spreadsheet::ParseExcel, it is compatible only for excel 95-2003 binary formats. Spreadsheet::XLSX is compatible for excel 2007 Raj
  • Comment on Re^6: string TRUE/FALSE getting converted to 1/0

Replies are listed 'Best First'.
Re^7: string TRUE/FALSE getting converted to 1/0
by soonix (Chancellor) on Jun 17, 2015 at 07:35 UTC
    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