This project has moved. For the latest updates, please go here.

How to add worksheet to existing workbook.

Jun 19, 2012 at 12:25 PM

Hi,

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

Arun

 

Editor
Jun 19, 2012 at 12:35 PM

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

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

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