Click here to Skip to main content
15,868,340 members
Articles / Web Development / ASP.NET
Alternative
Tip/Trick

DataSet to Excel File Conversion using ExcelLibrary

Rate me:
Please Sign up or sign in to vote.
4.14/5 (4 votes)
1 Feb 2012CPOL 20.9K   5   2
Hi,another alternative is this Excel C# / VB.NET component that has limited free version that can be used in commercial applications and unlimited professional version.Here is an Excel VB.NET code how to export DataSet to Excel:Dim ef = New ExcelFile()For Each dataTable As...

This article appears in the Third Party Products and Tools section. Articles in this section are for the members only and must not be used to promote or advertise products in any way, shape or form. Please report any spam or advertising.

Hi,

another alternative is this Excel C# / VB.NET component that has limited free version that can be used in commercial applications and unlimited professional version.

Here is an Excel VB.NET code how to export DataSet to Excel:
VB
Dim ef = New ExcelFile()

For Each dataTable As DataTable In dataSet.Tables
	ef.Worksheets.Add(dataTable.TableName).InsertDataTable(dataTable, 0, 0, True)
Next

ef.SaveXls(dataSet.DataSetName & ".xls")

License

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


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Questionexport to excel Pin
NekoNao21-Sep-14 20:00
NekoNao21-Sep-14 20:00 
GeneralReason for my vote of 1 Your alternative (Gembox Software Fr... Pin
rctaubert1-Feb-12 12:57
rctaubert1-Feb-12 12:57 
Reason for my vote of 1
Your alternative (Gembox Software Free edition is severely limited as to the size of the workbook.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.