Yesterday, I tested it.
Code: Select all
LOCAL cFileName
LOCAL cString := "所有 Excel 檔案|*.XLS|" + ;
"Excel 檔案 |*.XLS|" + ;
"所有檔案 | *.*"
cFileName := cGetFile( cString, "請選擇要抓入之檔案名稱", , "" )
cFileName := cGetFile32( cString, "請選擇要抓入之檔案名稱", , "" )
Run this code not work below:D:\客戶資料2.xls
or
R:\Project\CustomerRelationshipManagementErp\SQL-Unicode-SDI\242\Fivetech\Exe32\客戶資料2.xls
Code: Select all
If ! File( ( cFileName ) ) //==> Alwayse appear File not
Code: Select all
oExcel := TOleAuto():New( "Excel.Application" )
oExcel:WorkBooks:Open(cFileName)
Code: Select all
oExcel := CreateObject( "Excel.Application" )
oExcel:WorkBooks:Open(cFileName)
So, If I change Chinese File Name to English Name.Error description: Error Excel.Application:WORKBOOKS/14 DISP_E_BADPARAMCOUNT: OPEN
It's work fine.