65.9K
CodeProject is changing. Read more.
Home

DataSet to Excel File Conversion using ExcelLibrary

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.14/5 (4 votes)

Feb 1, 2012

CPOL
viewsIcon

21794

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...

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 DataTable In dataSet.Tables
	ef.Worksheets.Add(dataTable.TableName).InsertDataTable(dataTable, 0, 0, True)
Next

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