Microsoft Office Excel cannot access the file 'c:\inetpub\wwwroot\Timesheet\App_Data\Template.xlsx'

前端 未结 7 1616
死守一世寂寞
死守一世寂寞 2020-11-27 12:35

I have my code as follows :-

Microsoft.Office.Interop.Excel.Application oXL = null;
Microsoft.Office.Interop.Excel.Sheets sheets;
Application excel = new Mic         


        
7条回答
  •  不知归路
    2020-11-27 13:16

    Let me note that in my place, adding the c:\windows\syswow64\config\systemprofile\desktop directory didn't work.

    The point is that WOW64 stands for Windows on Windows64, that means it actually applies for 32-bit programs running on the 64bit OS.

    Since I have 64-bit Excel installed, the proper directory turned out to be the c:\windows\system32\config\systemprofile\desktop

提交回复
热议问题