Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application, both ASP.NET web sites and Windows Forms application.

Tue Jan 04, 2011 10:12 am

Hi, I want to rename a named sheet. When I set the name of the sheet, it creates another sheet with the new name. Also I don't known how to delete a named sheet. Can you help me?

tomason
 
Posts: 11
Joined: Mon Dec 27, 2010 3:08 am

Tue Jan 04, 2011 10:14 am

Thanks for your inquiry. You can use the following code to rename a worksheet:
Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets[0];
sheet.Name = ("MyRange");
sheet.Name = ("New");
workbook.SaveToFile("Sample.xls");
e-iceblue support
User avatar

iceblue support
 
Posts: 240
Joined: Tue Dec 21, 2010 2:56 am

Return to Spire.XLS