Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / web / ASP.NET

DataSet to Excel File Conversion using ExcelLibrary

4.14/5 (4 votes)
1 Feb 2012CPOL 21.8K  
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)