The Charts Object (ICharts)
The Charts object represents the set of all charts in a single worksheet.
To create a Charts object, use,
Charts Methods and Properties
| Charts Methods and Properties |
| Add |
Adds a chart to your Excel application. Add takes six parameters.
Charts.Add(ChartType, [SubType], [UpperLeftRow], [UpperLeftColumn],
[LowerRightRow], [LowerRightColumn])
Consult Chart Codes to select ChartType (pie, column, etc.) and SubType(default 0).
UpperLeftRow(default 0), UpperLeftColumn(default 0), LowerRightRow(default 10), and LowerRightColumn(default 10) determine the position of the chart in your
spreadsheet. The following example will generate a 3D pie chart with the upper left corner at row 3, column 0 (A),
and the lower right corner at row 15, column 7 (G).
Set Chart = ws.charts.add(1,1,3,0,15,7)
Top |
| Count |
Counts the number of charts in a worksheet. To retrieve the number of charts included in
a worksheet, use,
ChartCount = ws.charts.count
Top |
| Item |
Represents a single chart in a Charts collection. Item is the default property of Charts,
so Charts(1) is equivalent to Charts.Item(1).
Top |
Copyright © 2003, SoftArtisans, Inc.