[英]XLSX parsing using Spreadsheet::XLSX
I have a script that will do parsing for xls like: 我有一个脚本,将解析xls,如:
$parser = Spreadsheet::ParseExcel->new(
CellHandler => sub {$self->handle_cell(@_) },
NotSetCell => 1
);
Now I am modifying this to parse xlsx file and it seems like xlsx file will not take any parameters in new()
现在我修改它来解析xlsx文件,似乎xlsx文件不会在new()
使用任何参数
And handle_cell
function, we get sheet_index and workbook and 和handle_cell
函数一样,我们得到了sheet_index和workbook
$worksheet = $workbook->Worksheet($sheet_index); $worksheet->row_range();
I want to give parameters like CellHandler and NotSetCell to Spreadsheet::XLSX
also. 我想将像CellHandler和NotSetCell这样的参数提供给Spreadsheet::XLSX
。 But I came to know that Spreadsheet::XLSX
doen't take any parameters. 但我知道Spreadsheet::XLSX
不带任何参数。 Do we have any other Perl module that acts same as Spreadsheet::ParseExcel but for parsing xlsx? 我们是否有任何其他Perl模块与Spreadsheet :: ParseExcel相同但是用于解析xlsx?
Please help me in this. 请帮帮我。 Is there any other Perl module for parsing xlsx by passing arguments to new()? 是否有任何其他Perl模块通过将参数传递给new()来解析xlsx?
There's a project started at github: Excel-Reader-XLSX . 在github上开始了一个项目: Excel-Reader-XLSX 。 It isn't fancy but it works. 这不是花哨但它有效。
Yes. 是。 This is what I use. 这就是我使用的。
It has an api like the parse excel module, and can deal with xlsx files. 它有一个像解析excel模块一样的api,可以处理xlsx文件。 Look through the doc. 仔细阅读文档。 There is a paragraph or two about things you can do to reduce the memory foot print. 有一两段关于你可以做些什么来减少记忆足迹。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.