This project has moved and is read-only. For the latest updates, please go here.

How to add worksheet to existing workbook.

Jun 19, 2012 at 1:25 PM


I've created a workbook and added single worksheet in it, but i need to add more worksheets to the same workbook, how to proceed please need guidance.

Thank You



Jun 19, 2012 at 1:35 PM

package = new ExcelPackage(new FileInfo("temp.xlsx"));

var worksheet1 = package.Workbook.Worksheets.Add("sheet1");

var worksheet2 = package.Workbook.Worksheets.Add("sheet2");