赞
踩
use Spreadsheet::WriteExcel;
my $path="E:\\speakRecognize\\experiment\\data\\Result\\emotion_speaker"; #设置查询的目录
opendir(TEMPDIR, $path) or die "can't open it:$!";
my @dir = readdir TEMPDIR;#print join "\n",@dir;
close TEMPDIR;
#生成excel&设置输出格式
my $xlName = "Statistic.xls";
my $xl = Spreadsheet::WriteExcel->new($xlName);
my $xlsheet = $xl->add_worksheet("Sheet1"); #引号中为excel工作簿中表的名称
$xlsheet->freeze_panes(2, 0); #冻结首行
# Add a format
my @headFormat = ($xl->add_format(size=>'15',bg_color=>'21',align=>'center'), $xl->add_format(size=>'15',bg_color=>'25',align=>'center'));
my @dataFormat = ($xl->add_format(bg_color=>'22',align=>'right'), $xl->add_format(bg_color=>'23',align=>'right'));
my
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。