Hello,
I am using the following code to open XLS and I am getting ERROR READING XLS: cdm2013.xls - [S_OK]. Do I need to open XLS differently? I have MS Office Professional Plus 2010.
TRY
oExcel := GetActiveObject( "Excel.Application" )
CATCH
TRY
oExcel := CreateObject( "Excel.Application" )
CATCH
Alert( "Cannot Connect to Excel. [" + Ole2TxtError()+ "]" )
RETURN (.T.)
END
END
// Open XLS...
TRY
oExcel:WorkBooks:Open( cSource ) // Also tried oExcel:WorkBooks:Open( cSource, OleDefaultArg(), OleDefaultArg(), OleDefaultArg() )
oSheet = oExcel:ActiveSheet
CATCH
Alert( "Error Reading XLS: " + cSource + " - [" + Ole2TxtError()+ "]" )
RETURN (.F.)
END