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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Kapil GaurRank #390 · 6.4K reputationPosted Mar 12, 2019, 4:14 AM EDT
Jignesh KumarRank #91 · 22.9K reputationPosted Mar 12, 2019, 4:51 AM EDT
Andra Chahar71 reputationPosted Mar 12, 2019, 11:23 PM EDT
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);
}