2 回答

TA贡献1836条经验 获得超5个赞
OK,既然你知道怎么写perl,那么不细说其他。
你应该知道如何获取Font,对吧?而删除线是Font的一种。
{Font}->{Strikethrough} strike through: 0 or 1
如果匹配到等于1,那么Filter

TA贡献1828条经验 获得超3个赞
#!/usr/bin/perl -w
use strict;
use Spreadsheet::ParseExcel;
my $parser = Spreadsheet::ParseExcel->new(
CellHandler => \&cell_handler,
NotSetCell => 1
);
my $workbook = $parser->parse('test.xls');
sub cell_handler {
my $workbook = $_[0];
my $sheet_index = $_[1];
my $row = $_[2];
my $col = $_[3];
my $cell = $_[4];
# Do something useful with the formatted cell value
#print $cell->value(), "\n";
print $cell->get_format()->{Font}->{Strikeout},"\n";
}
test.xls:
- 2 回答
- 0 关注
- 1114 浏览
添加回答
举报