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?
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");