Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win32::OLE - Charting data series in Excel

Status
Not open for further replies.

billycairn

Technical User
Nov 5, 2003
22
GB
Hi all

I'm using ActiveState in a Cygwin shell on W2K.
I have a script which loads 3 data sets from a text file and charts each data series. What I'd like to do in addition is create a stacked line graph which displays 2 of the 3 series on the same graph.
I've tried recording a Macro and editing the syntax, but I keep getting the same result - the one series I don't want is successfully added to the new chart (coincidently the last series to get loaded to the excel application), but only a single (inaccurate) data point from the other two series.
How do I pull in the correct data series?

TIA

----------------------------------------------------
sub chartCompare() {

$chartC= $xl->Charts->Add;
$chartC->{ChartType}= 66; # stacked line
$chartC->SeriesCollection->NewSeries;
$chartC->SeriesCollection(1)->{Values}= "=,,' Wan data '!R1C1:R72C3";
$chartC->SeriesCollection->Newseries;
$chartC->SeriesCollection(2)->{Values}= "=,,' 2020 data '!R1C1:R72C3";
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top