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

Total Post:105

Points:739
Posted on    November-14-2013 12:55 AM

 C# C# 
Ratings:


 1 Reply(s)
 846  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:411

Points:2881
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