purly_kit_kat
purly_kit_kat

Reputation: 11

Not able to read Excel 2013 file with Spreadsheet::ParseExcel in perl

I have a simple piece of code,that is not loading the excel file. Can't figure out what I'm doing wrong :

my $parser = Spreadsheet::ParseExcel->new();
my $workbook = $parser->parse("test.xlsx");
if ( !defined $workbook ) {
    print("Unable to load workbook \n");
}

I also tried running with the full path of the file. The test.xlsx is an Excel 2013 file I am running in Windows with Perl 5.14.2 and the file is in the same folder as the .pl file.

Upvotes: 1

Views: 610

Answers (1)

Jim Davis
Jim Davis

Reputation: 5290

From the documentation for Spreadsheet::ParseExcel:

The Spreadsheet::ParseExcel module can be used to read information from Excel 95-2003 binary files.

The module cannot read files in the Excel 2007 Open XML XLSX format. See the Spreadsheet::XLSX module instead.

Upvotes: 4

Related Questions