tarunkhanna has asked for the wisdom of the Perl Monks concerning the following question:
sub add_chart_func { my $name = shift; my $chart = $workbook->add_chart( name => "$name",type => 'line' , +embedded => 1); $chart->set_title( name => "$name" ); $chart->add_series( categories => xl_range_formula( 'sheet', 1+$Graph_table_last_ro +w, $row, 1, 1 ), values => xl_range_formula( 'sheet', 1+$Graph_table_last_ro +w, $row, 2, 2 ), name => "$var1", ); $chart->add_series( categories => xl_range_formula( 'sheet', 1+$Graph_table_last_ro +w, $row, 1, 1 ), values => xl_range_formula( 'sheet', 1+$Graph_table_last_ro +w, $row, 3, 3 ), name => "$var2", ); $Graph_table_last_row = $Graph_table_last_row + 3; $grpsheet->insert_chart( "J$Graph_table_last_row", $chart, 10, 10, + 1.7, 1.5); $Graph_table_last_row = $row + 5; $graph_table_no++; }
$Graph_table_last_row is a global variable which contains the cell from top from where next chart will be drawn.
If I add '10' charts by calling the above function 10 times, In first 9 charts, the attributes on x-axis are printed properly. But in last chart, the attributes are printed alternately. I mean to say, while printing chart...x-axis attibutes are printed as 0,2,4,6,8,10. But at the place of 1,3,5,7,9 nothing is displayed. What shall I do to resolve this issue?? Regards.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Excel editing perl
by GrandFather (Saint) on Sep 29, 2011 at 10:43 UTC | |
by tarunkhanna (Novice) on Sep 29, 2011 at 11:38 UTC | |
by jethro (Monsignor) on Sep 29, 2011 at 12:48 UTC | |
by tarunkhanna (Novice) on Sep 29, 2011 at 15:04 UTC | |
by jethro (Monsignor) on Sep 30, 2011 at 09:43 UTC |