Hi all,
I'm trying to get Delphi 4 to create a chart in Excel. Stop sniggering.
Does anyone know how to get an Excel 'Range' object to work? The docs say
it expects an argument of - in VB speak - ("A1:H8") so that it looks like
...Range("A1:H8")...
So far my code does the following:
<snip>
ER := TExcelReport.Create; // ER.OLEExcel is the OLE automation object for
the Excel Application
<snip>
ASHT := ER.OLEExcel.ActiveWorkbook.ActiveSheet;
ASHT.Range('A1'); // error
<snip>
Variations on this error line (like below) don't work as far as I can see.
ASHT.Range.Cells(1,1);
ASHT.Range('"A1'");
ASHT.Range(ASHT.Range.Cells(1,1), ASHT.Range.Cells(2,2)):
My aim is to get back a range object that I can then use to help create my
chart.
Many thanks in advance.
Cheers,
Michael Switzer
Jump Productions
Phone +64 7 838 3371
Fax +64 7 838 3372
Email [EMAIL PROTECTED]
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz