Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Generating an Excel chart

by jmcnamara (Monsignor)
on Mar 12, 2012 at 09:01 UTC ( #959087=note: print w/replies, xml ) Need Help??

in reply to Generating an Excel chart

Spreadsheet::WriteExcel provides 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 ), );

Note, if you are creating an Excel 2007 workbook and chart then you could consider using Excel::Writer::XLSX. It has a slightly easier interface for this case:

$chart->add_series( categories => '=Sheet1!$A$2:$A$7' ); # Sa +me as ... $chart->add_series( categories => [ 'Sheet1', 1, 6, 0, 0 ] ); # Ze +ro-indexed.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://959087]
[Yaerox]: I feel like i'm not seeing the forest for the trees. Can someone give me a hint how to research converting all kinds of files into ansi? If origin file is utf8 convert to ansi, is origin file is ansi then skip file.
[1nickt]: Yaerox probably best to whip up an SSCCE demonstrating the failure in what you have now and post to SoPW as a question.

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2017-03-28 13:11 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (331 votes). Check out past polls.