当前位置:   article > 正文

使用perl创建Excel表格统计数据_perl freeze_panes

perl freeze_panes

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
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/316370
推荐阅读
相关标签
  

闽ICP备14008679号