Excel : opening existing xls-file
Posted: Tue Apr 14, 2009 12:35 pm
Hello,
Till now i can use a excel aplication as :
oExcel := CreateObject( "Excel.Application" )
oWorkBook := oExcel:WorkBooks:Add()
........
Ok , this works , excel seems to generate a file (name) , map1.xls , ....
Now , i try to open a existing xls file without succes , i have
oExcel := CreateObject( "Excel.Application" )
oWorkBook := oExcel:WorkBooks:Add()
cDest := "TESTDIR\ExcelFile.xls"
oExcel:WorkBooks:Open(cDest)
This give a error :
Error description: Error Excel.Application:WORKBOOKS/14 DISP_E_BADPARAMCOUNT: OPEN
Args:
[ 1] = C TESTDIR\ExcelFile.xls
Tryed also to open before workbooks:add
What do i wrong , who can give an example to open an existing xls-file ?
Frank
Till now i can use a excel aplication as :
oExcel := CreateObject( "Excel.Application" )
oWorkBook := oExcel:WorkBooks:Add()
........
Ok , this works , excel seems to generate a file (name) , map1.xls , ....
Now , i try to open a existing xls file without succes , i have
oExcel := CreateObject( "Excel.Application" )
oWorkBook := oExcel:WorkBooks:Add()
cDest := "TESTDIR\ExcelFile.xls"
oExcel:WorkBooks:Open(cDest)
This give a error :
Error description: Error Excel.Application:WORKBOOKS/14 DISP_E_BADPARAMCOUNT: OPEN
Args:
[ 1] = C TESTDIR\ExcelFile.xls
Tryed also to open before workbooks:add
What do i wrong , who can give an example to open an existing xls-file ?
Frank