简体   繁体   English

无法在Perl中使用Spreadsheet :: ParseExcel读取Excel 2013文件

[英]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. 我有一段简单的代码,没有加载excel文件。 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. test.xlsx是我在Windows中使用Perl 5.14.2运行的Excel 2013文件,该文件与.pl文件位于同一文件夹中。

From the documentation for Spreadsheet::ParseExcel : Spreadsheet :: ParseExcel的文档中:

The Spreadsheet::ParseExcel module can be used to read information from Excel 95-2003 binary files. Spreadsheet :: ParseExcel模块可用于从Excel 95-2003二进制文件中读取信息。

The module cannot read files in the Excel 2007 Open XML XLSX format. 该模块无法读取Excel 2007 Open XML XLSX格式的文件。 See the Spreadsheet::XLSX module instead. 请参阅Spreadsheet :: XLSX模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM