Link to home
Start Free TrialLog in
Avatar of frdep
frdep

asked on

Create an Excel file ??


How can I create an Excel file using the "servers" component with Delphi 6 ?

This code do not work:

  ExcelApplication1.Connect ;
  Try
    ExcelApplication1.Workbooks.Open('C:\Test.xls',
      EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam,
      EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam,
      EmptyParam, EmptyParam, 0) ;
    ExcelWorkSheet1.ConnectTo(ExcelApplication1.Sheets[1] As _WorkSheet) ;
  Except
    ShowMessage('Oupss !') ;
  End ;

ASKER CERTIFIED SOLUTION
Avatar of RickHalle
RickHalle

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RickHalle
RickHalle

Was that what you were looking for?
Hi,

If you search in the PAQ, you will find some example code of me, that creates an excell file and fills it with items.

Cu,
Floris.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

accept RickHalle's comment as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Thanks,

geobul
EE Cleanup Volunteer