I have saw the solution.
The name of the Book must be without the root and then is with oBook :=
oExcel:workbooks("151027-5390005441-817.xls"):Activate
Regards.
César.
HOJA A TRATAR
ccFIL := "D:\MIDAS\PROCESOS\FICHEROS\151027-5390005441-817.xls"
COMPRUEBA SI LA HOJA ESTÁ ABIERTA PARA CERRARLA
nHandle := FOpen( ccFIL, FO_READWRITE )
IF FError() <> 0
FClose( nHandle )
oExcel = GetObject( ccFIL,"Excel.Application" )
oBook := oExcel:workbooks("151027-5390005441-817.xls"):Activate
oExcel:ActiveWorkbook:Save()
oExcel:ActiveWorkbook:Close()
ELSE
FClose( nHandle )
ENDIF
"CESAR CALVO" escribió en el mensaje de
noticias:d246fe7$72865396$9d992@news.alaska-software.com...
Hello.
How can I select a excel file in order to close it?
cFil := "D:\MIDAS\PROCESOS\FICHEROS\151027-5390005441-817.xls"
oExcel = GetObject( cFIL,"Excel.Application" )
oBook := oExcel:workbooks: (I don´t know what is necessary here)
oBook:Save()
oBook:close(.T.)
Thanks.
César.