Home > DeveloperSection > Forums > How to create a new worksheet in Excel file c#?
Jayden Bell
Jayden Bell

Total Post:110

Posted on    November-14-2013 12:55 AM

 C# C# 

 1 Reply(s)
 1143  View(s)
Rate this:
I am developing a demo application and i need to create a new worksheet in Excel using C#.
Please help.

Pravesh Singh

Total Post:412

Posted on    November-14-2013 1:22 AM

Hi Jayden,

var xlSheets = xlWorkBook.Sheets as Excel.Sheets;

var xlNewSheet = (Excel.Worksheet)xlSheets.Add(xlSheets[1], Type.Missing, Type.Missing, Type.Missing);

xlNewSheet.Name = "newsheet";

Don't want to miss updates? Please click the below button!

Follow MindStick