Board index » delphi » Help to know the methods to work with OLE automation

Help to know the methods to work with OLE automation

Hi folks,
    please, where I can find a page with all OLE automation methods (for
MS applications - Excel)?

    For example, Charlie Calvert learn in your home page
(http://homepages.borland.com/ccalvert/TechPapers/Delphi/DelphiWord.htm)
that I can add some sheet in a Excel file:
    XLApplication.Workbooks[2].Sheets.Add(,,1,xlChart);

    I want to know: What is the method for READ some sheet in my
worksheet?
    XLApplication.Workbooks[2].Sheets.Read????????????????('A1...A12');
<<<<????????

    Where I can find ALL methods to work with Worksheets? Any help???

TIA,
--
Marcelo Muzilli
Support Analyst Datacom/Access
Phone:  +55 11 6224-8935
UIN: 1572797
E-Mail: mmuzi...@dreamtheater.zzn.com

 

Re:Help to know the methods to work with OLE automation


Hi!

You can find a detailed description of worksheet members in the "vba for
excel" help
if you have office 2000 it is the file VBAXL9.CHM (precompiled HTML File).
If you don't find it, you probably
didn't installe it. (usually it is not installed with the standard office
2000 setup, find it under office tools in the setup)

"Marcelo Muzilli" <mmuzi...@dreamtheater.zzn.com> schrieb im Newsbeitrag
news:3C860E14.32A3E61@dreamtheater.zzn.com...

Quote
> Hi folks,
>     please, where I can find a page with all OLE automation methods (for
> MS applications - Excel)?

>     For example, Charlie Calvert learn in your home page
> (http://homepages.borland.com/ccalvert/TechPapers/Delphi/DelphiWord.htm)
> that I can add some sheet in a Excel file:
>     XLApplication.Workbooks[2].Sheets.Add(,,1,xlChart);

>     I want to know: What is the method for READ some sheet in my
> worksheet?
>     XLApplication.Workbooks[2].Sheets.Read????????????????('A1...A12');
> <<<<????????

>     Where I can find ALL methods to work with Worksheets? Any help???

> TIA,
> --
> Marcelo Muzilli
> Support Analyst Datacom/Access
> Phone:  +55 11 6224-8935
> UIN: 1572797
> E-Mail: mmuzi...@dreamtheater.zzn.com

Re:Help to know the methods to work with OLE automation


Hello, if you want to download  it, go to
http://axon.tuke.sk/man/Help/Helps/

Here is the file "vbaxl9.chm" to download, so you don't need to install
office stuff...

Bye, success !
Jurgen

Quote
"Gnther Wimpassinger" <g...@pickem.at> wrote in message

news:3c861874_2@dnews...
Quote
> Hi!

> You can find a detailed description of worksheet members in the "vba for
> excel" help
> if you have office 2000 it is the file VBAXL9.CHM (precompiled HTML File).
> If you don't find it, you probably
> didn't installe it. (usually it is not installed with the standard office
> 2000 setup, find it under office tools in the setup)

> "Marcelo Muzilli" <mmuzi...@dreamtheater.zzn.com> schrieb im Newsbeitrag
> news:3C860E14.32A3E61@dreamtheater.zzn.com...
> > Hi folks,
> >     please, where I can find a page with all OLE automation methods (for
> > MS applications - Excel)?

> >     For example, Charlie Calvert learn in your home page
> > (http://homepages.borland.com/ccalvert/TechPapers/Delphi/DelphiWord.htm)
> > that I can add some sheet in a Excel file:
> >     XLApplication.Workbooks[2].Sheets.Add(,,1,xlChart);

> >     I want to know: What is the method for READ some sheet in my
> > worksheet?
> >     XLApplication.Workbooks[2].Sheets.Read????????????????('A1...A12');
> > <<<<????????

> >     Where I can find ALL methods to work with Worksheets? Any help???

> > TIA,
> > --
> > Marcelo Muzilli
> > Support Analyst Datacom/Access
> > Phone:  +55 11 6224-8935
> > UIN: 1572797
> > E-Mail: mmuzi...@dreamtheater.zzn.com

Re:Help to know the methods to work with OLE automation


<<Marcelo Muzilli:
please, where I can find a page with all OLE automation methods (for
MS applications - Excel)?

Quote

The VBA help that comes on your Office CD lists the methods and
properties - you just have to translate the examples from VB (which
you'll soon find easy).

<<Marcelo:
I want to know: What is the method for READ some sheet in my
worksheet?
XLApplication.Workbooks[2].Sheets.Read????????????????('A1...A12');

Quote

This reads the value of one cell as a string:
  Caption := Excel.ActiveCell.Text;

This reads the values of a range of cells into a variant array:

var
  ArrV: OleVariant;
..
  ArrV := WS.Range['B2', 'D3'].Value;

If they were numbers, for example, you could then loop through the
variant array adding them up:

  Sum := 0;
  for Row := 1 to 2 do
    for Col := 1 to 3 do
      Sum := Sum + ArrV[Row, Col];
  ShowMessage('Sum is ' + FloatToStr(Sum));

--
Deborah Pate (TeamB) http://delphi-jedi.org

  TeamB don't see posts sent via Google or ISPs
  Use the real Borland server: newsgroups.borland.com
  http://www.borland.com/newsgroups/genl_faqs.html

Re:Help to know the methods to work with OLE automation


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbax...
Quote
Marcelo Muzilli wrote:
> Hi folks,
>     please, where I can find a page with all OLE automation methods (for
> MS applications - Excel)?

>     For example, Charlie Calvert learn in your home page
> (http://homepages.borland.com/ccalvert/TechPapers/Delphi/DelphiWord.htm)
> that I can add some sheet in a Excel file:
>     XLApplication.Workbooks[2].Sheets.Add(,,1,xlChart);

>     I want to know: What is the method for READ some sheet in my
> worksheet?
>     XLApplication.Workbooks[2].Sheets.Read????????????????('A1...A12');
> <<<<????????

>     Where I can find ALL methods to work with Worksheets? Any help???

> TIA,
> --
> Marcelo Muzilli
> Support Analyst Datacom/Access
> Phone:  +55 11 6224-8935
> UIN: 1572797
> E-Mail: mmuzi...@dreamtheater.zzn.com

Other Threads