2 回答

TA貢獻(xiàn)1836條經(jīng)驗(yàn) 獲得超5個(gè)贊
OK,既然你知道怎么寫perl,那么不細(xì)說其他。
你應(yīng)該知道如何獲取Font,對吧?而刪除線是Font的一種。
{Font}->{Strikethrough} strike through: 0 or 1
如果匹配到等于1,那么Filter

TA貢獻(xiàn)1828條經(jīng)驗(yàn) 獲得超3個(gè)贊
#!/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 關(guān)注
- 1162 瀏覽
添加回答
舉報(bào)