This seems to happen if your application doesn't quit the Excel Application.  Make 
sure that when you finish you have ExcelAppliaction1.Quit. 

-----Original Message-----
From: Kurt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 31 August 2000 9:31
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Control of Excel Object


It could have something to do with Com objects not being freed - after
you close Excel the first time is it still hanging around? 

Anyway, the place to go about automating Excel is 
   http://www.djpate.freeserve.co.uk/AutoExcl.htm  

Cheers.
Kurt.

> Mark Howard wrote:
> 
> Hello
> 
> I've implemented the export of data from my app to Excel spreadsheets
> based almost exactly on the example given in Marco Cantu's (excellent)
> Mastering Delphi 5.
> 
> It works fine for the first export - Excel is opened, a new workbook
> is added and shown and the data is written to the first worksheet.
> 
> If I then close Excel and export data again, everthing works fine
> EXCEPT that the new workbook is not shown.  To see it you have to
> View/Full Screen and Close Full Screen.
> 
> I'm using the following code
> 
>       ExcelApplication1.Visible [0] := True;
>       ExcelApplication1.Workbooks.Add (NULL, 0);
> Does anyone know what I have to do to ensure that the workbook will be
> visible for subsequent exports?
> 
> Thanks
> 
> Mark
---------------------------------------------------------------------------
    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"

------------------------------------------------------------------------------
This message and any attachment is confidential and may be privileged or otherwise 
protected from disclosure.  If you have received it by mistake please let us know by 
reply and then delete it from your system; you should not copy the message or disclose 
its contents to anyone.




---------------------------------------------------------------------------
    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"

Reply via email to