Error creating excel file in c # webapplication

I get the following error while creating an excel file

System.UnauthorizedAccessException: Retrieving the COM factory class for components with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). in QA.CreateExcel.createDoc () in e: \ ~~ CreateExcel.cs: line 33

I am using this code.

private Office.Excel.Application app =new Office.Excel.Application();

m using fw 4.0 and its web application

+3
source share
2 answers

Office 2007/2010 file formats are XML files wrapped in ZIP files and can be created on the server side without having to install Office. Some searches on the Internet will reveal solutions to simplify this task.

, Codeplex , , Excel, , .

http://www.codeproject.com/KB/office/ExcelPackage.aspx

+2

, Excel IIS . , , , - ( ). Office.

Office - . http://support.microsoft.com/kb/257757 , .

0

Source: https://habr.com/ru/post/1794427/


All Articles