Hi,
How to export Dataset to multiple excel sheet.
Thanks in Advance
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Andra ChaharPosted Mar 13, 2019, 3:23 AM
Workbook workbook = new Workbook();
workbook.Worksheets.Clear();
foreach (DataTable dt in dataset.Tables)
{
Worksheet worksheet = workbook.Worksheets.Add(dt.TableName);
worksheet.InsertDataTable(dt,true,1,1);
}
workbook.SaveToFile(outputExcel,ExcelVersion.Version2016);
}
Jignesh KumarPosted Mar 12, 2019, 8:51 AM
Kapil GaurPosted Mar 12, 2019, 8:14 AM