[英]How to read Excel file in Perl by sheet name
I am looking for some examples/advice on how to write a Perl script to read data from an Excel file by sheet name and not sheet number.我正在寻找一些关于如何编写 Perl 脚本以按工作表名称而不是工作表编号从 Excel 文件中读取数据的示例/建议。 This is an example with Spreadsheet
, but it doesn't work with sheet name:这是Spreadsheet
的示例,但不适用于工作表名称:
#Code Perl :
use Spreadsheet::Read qw(ReadData);
{
my $book = ReadData ("test.xls");
my $sheet = $book->sheet ("name_3");
my @rows = rows ($sheet);
...
}
Can you help me please?你能帮我吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.