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
OLE file name
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: OLE file name
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
- Eugeniusz Owsiak
- Posts: 60
- Joined: Fri Oct 07, 2005 5:38 am
- Location: Poland
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
EugeniuszEugeniusz Owsiak wrote:Richard,
I think it is a good and simple solution but where can I found info of oExcel object property?
regards 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:Rows:Count()
nCols := oSheet:UsedRange:Columns:Count()
Richard
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact: