Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Excel chart for dynamic data

by jmcnamara (Monsignor)
on Mar 23, 2012 at 08:53 UTC( #961168=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://961168]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (1)
As of 2016-08-30 00:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (410 votes). Check out past polls.