Link to home
Start Free TrialLog in
Avatar of alanjbrown
alanjbrown

asked on

How to loacte Excel spreadsheet within Delphi7 form using Excel server component

Can I get an Excel spread sheet to appear within a delphi7 form?
Currently I can get the Excel to be controlled by delph, but for this particular application I need to have the spreadsheet within the form so that I can but delphi controls around it.

Thanks in anticipation
Avatar of FactorB
FactorB

You can connect to the spreadsheet with ADO and DBGrid and treat it like a table.
Avatar of alanjbrown

ASKER

Not what I want.
I need to use the Excel spreadsheet instead of a DBGrid

Avatar of Lukasz Zielinski
you mean you want excel embedded in your form?

ziolko.
ASKER CERTIFIED SOLUTION
Avatar of Lukasz Zielinski
Lukasz Zielinski
Flag of Poland image

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
Yes this is what I am trying to do.
Is it possible to connect to this instance of Excel via the server component and then control the spreadsheet via com?

Can you ptrovide a sample of the code please.

Alan
code above does that, if you want to control excel like you do with Excel component you can use:

  OleContainer1.OleObject
  OleContainer1.OleObjectInterface

properties first of them returns OleVariant second IOleObject interface, but both of them are pointers to similar interface as TExcelApplication implements

ziolko.