Rename a Worksheet

Contents
[ ]

Example

Renaming a worksheet is a simple task that can be very useful. For example, if you want to label worksheets so that it is obvious what each one contains. For example, a model might have 12 worksheets, each named by month, to hold expense information.

To rename a worksheet using Aspose.Cells.GridDesktop control:

  1. Add a Aspose.Cells.GridDesktop control to a form.
  2. Get the reference of a desired worksheet.
  3. Set the name of the worksheet using its reference.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Accesing an active worksheet directly
Worksheet sheet = gridDesktop1.GetActiveWorksheet();
// Renaming a worksheet
sheet.Name = "Renamed Sheet";