使用perl脚本将图表添加到Excel

loading...


0

我想从excel文件创建一个图表 . 数据已经添加,我想读取数据并创建excel . 实际上它正在跳过一些x轴值 . 我试过这样的 .

my $chart1 = $workbook->add_chart( type => 'column', embedded => 1 );       
    $chart1->add_series(
            categories => '=sheet1!$A$11:$A$37',
                values     => '=sheet1!$B$11:$B$37',
                name       => 'Block status',
                data_labels =>  {category => 1, value=>1,position => 'above'},
            );
        $chart1->set_title( name => 'Results of block' );
        $chart1->set_x_axis( name => 'Flows' );
        $chart1->set_y_axis( name => 'Error' );
        $chart1->set_x_axis(interval_tick=> 4);
        $chart1->set_x_axis(position_axis=> 'on_tick');
        $chart1->set_size(width=>720, height =>576);
        $Log_Sheet->insert_chart( 'F10', $chart1 );

它没有采用所有的x轴值 . 怎么做?

loading...

0回答

No Data

评论

暂时没有评论!