I have three worksheets in a workbook. The second and third sheet each have a chart. I am trying to access one of these charts to change the title and data range.
I have defined
I can access a worksheet with
ExcelWS := XLApp.WorkSheets.Get_Item(2) as ExcelWorkSheet;
However I am unable to access the Chart.
Chart := XLApp.Charts as ExcelChart;
Chart := XLApp.Charts.Get_Item(1) as ExcelChart;
both give me an Invalid index error
Does any one have any idea of the correct syntax to achieve this.
Delphi v6 with Excel2000.pas
Windows 7 Professional