[python-win32] Win32 and excel charts

Elester Johnson johnson@equadriga.com
Mon, 10 Mar 2003 15:42:08 +0530


Hi Antone,
Try this..its just a sample - may be of some help.....I can send a detailed
one later..
wkb.Charts.Add()
wkb.ActiveChart.ChartType = 0x33 #BAR
#wkb.ActiveChart.ChartType = 0x3b #pie
#wkb.ActiveChart.ChartType = 0x47 #bar/pie
wkb.ActiveChart.SetSourceData(
Source=wkb.Sheets("WORKSHEETNAME").Range("A3:A10") )
wkb.ActiveChart.Location( Where =0x2, Name ="WORKSHEETNAME")
where,
- WORKSHEETNAME = name of worksheet
- A3:A10 is the data of the column or row for the axis u need. for x and y ,
use UNION, or Range(range,range)
- Location - specify where to place the chart ie. as an object in the same
sheet or a new worksheet


Elester Johnson