Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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.


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

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 avoiding work at the Monastery: (9)
As of 2015-07-07 02:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (86 votes), past polls