FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour OLE file name
Posts: 60
Joined: Fri Oct 07, 2005 05:38 AM
OLE file name
Posted: Thu Oct 20, 2005 07:07 PM

Hallo
How can I get name of opened thru OLE xls file?

....
oExcel := TOleAuto():New( "Excel.Application" )
oExcel:WorkBooks:Open(cGetFile("*.XLS", "Select Excel File"))
//msginfo(oExcel:WorkBooks:FileName())
...

Regards Eugeniusz

Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: OLE file name
Posted: Thu Oct 20, 2005 07:55 PM
Eugeniusz Owsiak wrote:Hallo
How can I get name of opened thru OLE xls file?

....
oExcel := TOleAuto():New( "Excel.Application" )
oExcel:WorkBooks:Open(cGetFile("*.XLS", "Select Excel File"))
//msginfo(oExcel:WorkBooks:FileName())
...

Regards Eugeniusz
:-)

Try it this way

CFILE := cgetfile32("*.xls", "Sélectionnez le fichier",1,ALLTRIM(BDEF->CHEMIN))

oExcel:WorkBooks:Open( CFILE )

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 60
Joined: Fri Oct 07, 2005 05:38 AM
OLE file name
Posted: Fri Oct 21, 2005 05:37 AM

Richard,

I think it is a good and simple solution but where can I found info of oExcel object property?

regards Eugeniusz

Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
OLE file name
Posted: Fri Oct 21, 2005 06:32 AM
Eugeniusz Owsiak wrote:Richard,

I think it is a good and simple solution but where can I found info of oExcel object property?


regards Eugeniusz


Eugeniusz

Sorry i do not understand the question

What exactly are you looking for ? Active sheet ?

If so try

oSheet = oExcel:Get( "ActiveSheet" )
nRows := oSheet:UsedRange:Count()
nCols := oSheet:UsedRange:Count()


Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
OLE file name
Posted: Fri Oct 21, 2005 07:58 AM
Eugeniusz Owsiak wrote:Richard,

I think it is a good and simple solution but where can I found info of oExcel object property?


regards Eugeniusz


Search for VBA*.CHM in your hard disk.

EMG

Continue the discussion