Click here to Skip to main content
15,889,877 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to use dll to export data from grid to excel. Need dll so that it can be used in whole solution, also want to avoid same repetition of code and its for asp web site project. Please help??

What I have tried:

Tried code available for export to excel using c#, but want some tool or dll to avoid reputation of code
Posted
Updated 17-Mar-16 5:22am
Comments
Patrice T 17-Mar-16 3:11am    
Richard MacCutchan 17-Mar-16 5:52am    
Google is your friend.

Using Excel interop is a bad idea as it isn't supported and it's going to fail and give you all sorts of errors. Also no doubt you're still coding this on your local development machine and haven't tried to deploy it yet so have no idea the issues you face.

Instead use a library that is designed to do this from asp.net. google "open source library reading excel asp.net" and you'll find some likely candidates;

c# - Import and Export Excel - What is the best library? - Stack Overflow[^]

You can use the Open XML SDK or the Excel ODBC driver, but there are lots of third party libraries out there too.
 
Share this answer
 
Comments
Member 10678104 30-Mar-16 1:41am    
Thanks using Open XML
so put your export code to a separate library project (which will compile to a dll by Default) - I can not imagine what could be your problem with that?
 
Share this answer
 
Comments
Member 10678104 30-Mar-16 1:42am    
I have already tried that, but want more formatting for excel so trying to find if there is any open source dll :)

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900