in reply to Excel chart for dynamic data
If you are using Spreadsheet::WriteExcel there is a utility function called xl_range_formula()to deal with this.
See the Working with cell ranges section of the chart documentation:
$chart->add_series( categories => xl_range_formula( 'Sheet1', 1, 9, 0, 0 ), values => xl_range_formula( 'Sheet1', 1, 9, 1, 1 ), );
If you are using Excel::Writer::XLSX you can use the same utility function or pass an arrayref instead:
$chart->add_series( categories => '=Sheet1!$A$2:$A$7' ); # Sa +me as ... $chart->add_series( categories => [ 'Sheet1', 1, 6, 0, 0 ] ); # Ze +ro-index.
--
John.
|
---|
In Section
Seekers of Perl Wisdom