So this was a little more funcky than i thought it would be. I based the example from
example in VB, but the following should add an empty chart on a worksheet
error = Excel_SheetsAdd (ExcelSheetsHandle, NULL, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL,
&newSheetHandle);
error = Excel_WorksheetChartObjects (newSheetHandle, NULL,
CA_DEFAULT_VAL,
&chartObjectHandle);
error = Exce
l_ChartObjectsAdd (chartObjectHandle, NULL, 50, 40, 300,
200, &excelSingleChartObject);
error = Excel_GetProperty (excelSingleChartObject, NULL,
Excel_ChartObjectChart, CAVT_OBJHANDLE,
&excelChartHandle);
Then its just a matter of giving the chart the data source and you should be set.
I hope this helps, i tested this with Excel 2002
Bilal
Bilal Durrani
NI