Rename

Technical support for Spire.XLS

Moderators: iceblue support, Flash, Manager

Rename

Postby tomason » 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

Re: Rename

Postby iceblue support » 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: 244
Joined: Tue Dec 21, 2010 2:56 am


Return to Spire.XLS

Who is online

Users browsing this forum: No registered users and 0 guests