Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Create Charts using Excel and Win32::OLE

by Anonymous Monk
on Apr 23, 2004 at 14:58 UTC ( #347647=note: print w/ replies, xml ) Need Help??


in reply to Re: Using Win32::OLE and Excel - Tips and Tricks
in thread Using Win32::OLE and Excel - Tips and Tricks

Here's a little example that may help other novice monks:

my $Chart; unless ($Book->Charts->Count) { $Chart = $Book->Charts->Add({After => $Sheet}); # $Sheet is my data sheet $Chart->{Name} = "Graphics"; $Book->Save(); } else { $Chart = $Book->Charts("Graphics"); } $Chart->SetSourceData($Sheet->Range('A1','C124'),xlColumns); # Range, +xlRowCol $Chart->{ChartType} = xlXYScatterLines; # xlChartType; $Chart->Legend->{Position} = xlLegendPositionBottom; # xlLegendPositio +n $Chart->Activate(); # Axes my $Xaxes = $Chart->Axes(xlCategory, xlPrimary); $Xaxes->{HasTitle} = 1; $Xaxes->{AxisTitle}->{Characters}->{Text} = "seconds"; my $Yaxes = $Chart->Axes(xlValue, xlPrimary); $Yaxes->{HasTitle} = 1; $Yaxes->{AxisTitle}->{Characters}->{Text} = "number";


Comment on Create Charts using Excel and Win32::OLE
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2015-07-02 06:12 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 (29 votes), past polls