Microsoft Office Excel 不能訪問文件“XXXXX.xls”。 可能的原因有: 文件名稱或路徑不存在。
此代碼在2003的服務(wù)器上運行的沒有問題,在給工作目錄加上了相應(yīng)的權(quán)限后發(fā)現(xiàn)問題依舊。無奈,上網(wǎng)去轉(zhuǎn)了一圈,找到了一個解決方法,以下是其中關(guān)鍵的部分: This solution is ... Windows 2008 Server x64 C:/Windows/SysWOW64/config/systemprofile/Desktop Windows 2008 Server x86 Please make this folder. C:/Windows/System32/config/systemprofile/Desktop ...instead of dcomcnfg.exe. This operation took away office automation problems in my system. A Desktop folder seems to be necessary in the systemprofile folder to open file by Excel. It disappears from Windows2008, Windows2003 had the folder, 即在C:/Windows/System32/config/systemprofile和C:/Windows/SysWOW64/config/systemprofile目錄下創(chuàng)建名為Desktop目錄即可解決問題。 |
|