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

前端 未结 7 1618
死守一世寂寞
死守一世寂寞 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:38

    I would like to add something to the Eric Bonnot's answer : The answer worked out partially as I worked on a IIS server with a non-admin user with the powerpoint PIA.

    I noticed that I could not open a pptx file if this one had a media (picture for example) in it.

    The "hack" was to add also the rights to the windows user (the one using the PIA) on the systemprofile/AppData directories.

    Hope this helps

提交回复
热议问题