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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating the a excel chart series name???

Status
Not open for further replies.

puckhogs98

Programmer
Apr 3, 2010
2
CA
Hello

I have a HTML/Javascript program that:
a. creates an excel file.
b. creates 4 worksheets.
c. creates multiple charts.

I have created the charts, however, the series labels appear as series1,series2,series3,series4,series5,series6.

The labels for the series are in cells: d1,e1,f1,g1,h1,i1

I attempted to modify the series with the following code:

1. cht.Chart.SeriesCollection(1).Delete;
2. cht.Chart.SeriesCollection(1).Name="=overall!D1";
3. cht.Chart.SeriesCollection(2).Name="=overall!E1";
4. cht.Chart.SeriesCollection(3).Name="=overall!F1";
5. cht.Chart.SeriesCollection(4).Name="=overall!G1";
6. cht.Chart.SeriesCollection(5).Name="=overall!H1";
7. cht.Chart.SeriesCollection(6).Name="=overall!I1";

This is giving me an error of unable to modify the Name Property.

The Series is a bit confusing and I am not sure If I have the correct syntax.

Any help would be greatly appreciated.!



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top