Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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.


Comment on Re: Excel chart for dynamic data
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2015-11-26 11:20 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (697 votes), past polls