Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

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

cron