gpt4 book ai didi

excel - 无法在 perl 中使用 Spreadsheet::ParseExcel 读取 Excel 2013 文件

转载 作者:行者123 更新时间:2023-12-04 21:37:44 27 4
gpt4 key购买 nike

我有一段简单的代码,它没有加载 excel 文件。无法弄清楚我做错了什么:

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

我还尝试使用文件的完整路径运行。
test.xlsx 是 Excel 2013 文件
我正在使用 Perl 5.14.2 在 Windows 中运行,并且该文件与 .pl 文件位于同一文件夹中。

最佳答案

来自 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.

关于excel - 无法在 perl 中使用 Spreadsheet::ParseExcel 读取 Excel 2013 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30430662/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com