Board index » delphi » Using Excel TLB

Using Excel TLB

Can anyone please assist me.  I am trying to open an existing excel workbook
from with Delphi.  How is this done,  I have tried using

  IExcel := Excel_TLB.CoApplication_.Create;
  IExcel.Workbooks.Open ('c:\Book1.xls');

but I am not sure what other parameters I should be passing to the open
function.

Thanks in advance,

Chris Snow.

 

Re:Using Excel TLB


try Excel Visual Basic help
(for Excel 97 : vbaxl8.hlp)

Quote
Chris Snow wrote:

> Can anyone please assist me.  I am trying to open an existing excel workbook
> from with Delphi.  How is this done,  I have tried using

>   IExcel := Excel_TLB.CoApplication_.Create;
>   IExcel.Workbooks.Open ('c:\Book1.xls');

> but I am not sure what other parameters I should be passing to the open
> function.

> Thanks in advance,

> Chris Snow.

--

===========================================
Micha3 Furman
mich...@kamsoft.com.pl

Re:Using Excel TLB


Take a look at the Type Library, You will need to pass "EmptyParam" to all
parameters that you want to use the Defaults for.  You are Simply not
supplying enough parameters.  Excel.Workbooks.Open() Requires 17 Parameters.

Kevin

Quote
Micha3 Furman <mich...@kamsoft.com.pl> wrote in message

news:37A550CC.44553F98@kamsoft.com.pl...
Quote
> try Excel Visual Basic help
> (for Excel 97 : vbaxl8.hlp)

> Chris Snow wrote:

> > Can anyone please assist me.  I am trying to open an existing excel
workbook
> > from with Delphi.  How is this done,  I have tried using

> >   IExcel := Excel_TLB.CoApplication_.Create;
> >   IExcel.Workbooks.Open ('c:\Book1.xls');

> > but I am not sure what other parameters I should be passing to the open
> > function.

> > Thanks in advance,

> > Chris Snow.

> --

> ===========================================
> Micha3 Furman
> mich...@kamsoft.com.pl

Other Threads