How to create Excel file in asp.net

I desire to produce Excel Sheet in asp.net. I have actually currently done code for this and it is working fine in regional system however when I am testing it on server then it gives the following mistake.

Recovering the COM class factory for part with CLSID stopped working due to the following mistake: 80070005.

Utilizing Office on the server (like from asp.net) is not supported. There are numerous components (also freeware) that can let you create Excel files from asp.net http://www.iditect.com/faq/excel/asp-net-mvc-download-excel-file.html

I just produced a basic application and hosted in IIS6.0. In code I’m just instantiating stand out items.

I tried with numerous possible options discovered on web, but none of them were worked for me.

This allows the application to be run with higher opportunities and in the majority of cases will repair the issue easily. +1 for the answer on that one. However, remember that running an application pool under an account that has high-level user rights is a serious security threat. More information on this on MSDN. I would recommend just altering the identity if you’re comfy with the dangers and understand exactly what the effect could be.

Well I learnt that the issue might be really in the header of the stick out data, that it executes not consist of the BOM byte set (at the starting point of the data embodying the securing utilized).

Why perform you intend to execute this? If you are in fact liking to cultivate Excel documents, there are actually far better ways to do this, including OpenXML as exposed someplace else on this chain. Fulfill execute not operate Excel on the throwing server!

I think the issue you are actually having is actually as a result of a 64bit method seeking to access a 32bit dll.

Perform you possess Excel mounted online server? The interop individual interfaces you are in fact producing usage of are really made use of to automate Excel which asks for that the Excel treatment is really put in absolutely there certainly. Each webpage ask for cycle will maybe launch a several instances of excel.exe. I will strongly promote versus conducting this as element of a world wide web request. Why do you yearn for to do this? If you are in fact liking to generate Excel documentations, there are a whole lot much better treatments to carry out this including OpenXML.

If you can’t alter the desired processor chip you could help make an attempt to make it possible for 32-bit Procedures from the Ask for Swimming swimming pools atmospheres in IIS.

Perform you have Excel placed up on the throwing web server? The interop interface you’re using are used to automate Excel which needs to have that the Excel function is in fact assembled there certainly.

 

Leave a Reply

Your email address will not be published. Required fields are marked *