Click here to Skip to main content
14,454,989 members
Rate this:
Please Sign up or sign in to vote.
See more:
I wanted to extract data in an asp.net mvc web application on sql to Excel.
I wanted to know how to do it.


What I have tried:

How
extract data in an asp.net mvc web application on sql to Excel
Posted
Updated 11-Feb-20 6:45am
Comments
Maciej Los 4-Feb-20 15:22pm
   
What have you tried?
digimanus 5-Feb-20 3:25am
   
I guess asking a question here
Rate this:
Please Sign up or sign in to vote.

Solution 1

Start here: Google[^]

There's over 3440000 results! For example: Export Data In Excel Sheet In ASP.NET MVC[^]
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

I had a task to do this with Web Forms and I had some issues using the MSFT interop office DLL's and found this piece of Open Source Software an good solution
EPP Plus

GitHub - JanKallman/EPPlus: Create advanced Excel spreadsheets using .NET[^]

NuGet Gallery | EPPlus 4.5.3.3[^]
   
Comments
Richard Deeming 11-Feb-20 12:38pm
   
I'm not surprised you had problems with Office interop:

Considerations for server-side Automation of Office[^]
"Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment."

:)
MarcusCole6833 11-Feb-20 14:02pm
   
a slight learning curve; one of those it works on my machine!!!!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100