Rename Worksheets

Renaming a Worksheet

All worksheets contain a Name property that allows developers to access or modify worksheets' names. To rename a worksheet:

  1. Access a worksheet from the GridWorksheetCollection.
  2. Rename the selected worksheet.

Before executing the code, the worksheet has a default name, such as Sheet1.

Input file: a worksheet with a default name Sheet1

todo:image_alt_text

After running the code, the worksheet is renamed Students.

Output: the worksheet is renamed Students

todo:image_alt_text