我在Delphi 7中打開EXCEL 2007時遇到困難它適用於Office 2003及以下版本,但微軟的精彩人物已發送更新或其他內容,並且delphi應用程序剛剛崩潰月。Delphi 7和Excel 2007打開文件錯誤
oE := GetActiveOleObject('Excel.Application');
oE.Workbooks.Open(Filename:=sFilename, UpdateLinks:=false, ReadOnly:=true); //Error
我得到以下錯誤:
'c:\Temp\Book1.xls' could not be found. Check the spelling of the file name, and verify that the file location is correct.'#$A#$A'If you are trying to open the file from your list of most recently used files, make sure that the file has not been renamed, moved, or deleted'
然而,如果我在VBA運行相同的命令是沒有問題的。
什麼是您用來打開該文件的VBA腳本? – 2010-06-17 08:44:29
在Excel宏中: Application.Workbooks.Open「C:\ Temp \ Book1.xls」,false,true – Traci 2010-06-18 00:45:11