in reply to Help with Spreadsheet::WriteExcel::Chart

This will help:
#!/usr/bin/perl use strict; use warnings; use Spreadsheet::WriteExcel; use Spreadsheet::WriteExcel::Utility; my( $row, $name ) = @_; my $workbook = Spreadsheet::WriteExcel->new('chart.xls'); my $worksheet = $workbook->add_worksheet(); my $chart = $workbook->add_chart( type => 'line' ); $chart->set_title( name => $name ); foreach my $i ( 1 .. 6 ) { my $rowi; my $maxcol; $chart->add_series( name => my $header, catagories => xl_range_formula( 'Sheet1', 1, 1, 2, $maxcol ) +, values => xl_range_formula( 'Sheet1', $rowi, $rowi, 2, $ +maxcol ), ); }

Replies are listed 'Best First'.
Re^2: Help with Spreadsheet::WriteExcel::Chart
by ag4ve (Monk) on Jan 24, 2011 at 14:58 UTC

    how does that help? i mean, what am i doing wrong? why would i set an undefined $rowi or an undefined $maxcol as the row and column i want to get values from? why would i set an undefined $header as an attribute to name?

    i'm sure in abstracting the code, you're implying something i'm just not seeing. however, what am i missing here?