Hey guys,

Here's an easy one for you. How does one open up an excel spreadsheet and
fill in some cells.

I have got this so far after about 3 hours of tearing my hair out trying to
read the Delphi help file....


var
  Icid        : Integer;

begin
  Icid := $1409;

  ExcelApplication1.Connect;
  ExcelApplication1.Visible[Icid] := True;
  ExcelApplication1.Caption := 'WE are now linked to Excel!!';

  ExcelApplication1.Workbooks.Add(EmptyParam,Icid);  // This line not
necessary I think
  ExcelWorkBook1.ConnectTo(ExcelApplication1.WorkBooks.Item[1]);

  ExcelWorkSheet1.ConnectTo(_WorkSheet(ExcelWorkBook1.Worksheets[1])); // I
think?


What's the next step?

  ExcelWorkSheet1.Cells[1,1] := 'Hello'; // ??????

Why oh why does Delphi not write a help manual that actually makes sense????

I can do it with a word document - there is a step by step demo but none for
excel.


Thanks in advance,

Steve Aish
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to