Spreadsheet::ParseExcel不能处理加载宏的excel文件吗?

Spreadsheet::ParseExcel不能处理加载宏的excel文件吗?

不加载宏的可以打印,加载的就打印不出来,究竟怎样才能处理加载宏的excel文件?

[Copy to clipboard] [ - ]
CODE:
use strict;
use Spreadsheet::ParseExcel;
use Encode;
die "You must provide a filename to $0 to be parsed as an Excel file" unless @ARGV==1;
my $file=shift;
my %count;
my $excel = Spreadsheet::ParseExcel::Workbook->Parse($file);
foreach my $sheet (@{$excel->{Worksheet}}[0..2]) {
printf("Sheet: %s\n", $sheet->{Name});
foreach my $row ($sheet->{MinRow} .. $sheet->{MaxRow}) {
   my $cell = $sheet->{Cells}[$row][1];
   if ($cell) {
    $count{decode('GB2312',$cell->{Val})}++;
    #printf("( %s , %s ) => %s\n", $row, 5, $cell->{Val});
   }
}
}
for my $c(sort keys %count)
{ print "$c,$count{$c}\n"; print "haha\n";}

如果是Windows环境,建议用Win32::OLE模块。
Win32::OLE模块如何读取excel工作表内容,有没有相关例子?我暂时找不到