graph - Why does my Perl code overwrite the location of my value in the spreadsheet? -


i'm trying create chart within spreadsheet (using spreadsheet::write). want put 1 category , 1 value somehow value of, well, 'value' gets overwritten.

i'm adding series this:

my $chart = $workbook->add_chart( type => 'column', embedded => 1 );  $chart->add_series(         categories  => '='.$worksheet->get_name().'!$a$'.$aeccells[0],         values      => '='.$worksheet->get_name().'!$b$'.$aeccells[0],          name       => $aecparams[0],      );  print "\n--->".$aeccells[0];   $chart->set_title (name => 'plots');  $worksheet->insert_chart('i2', $chart ); 

technically, should take value bx cell it's not :/, it's taking 1 ax ...which not numeric value string useless graph.

any ideas i'm doing wrong?

putting name of worksheet inside quotes , using cell ranges should solve issue:

$chart->add_series(         categories  => '=\''.$worksheet->get_name().'\'!$a$1:$a$'.$aeccells[0],         values      => '=\''.$worksheet->get_name().'\'!$b$1:$b$'.$aeccells[0],          name       => $aecparams[0],      ); 

Comments