Spread Windows Forms 7.0 Product Documentation
Moving a Sheet
See Also Support Options
Spread Windows Forms 7.0 Product Documentation > Developer's Guide > Understanding the Spreadsheet Objects > Working with Sheets > Moving a Sheet

Glossary Item Box

If you have multiple sheets, you can move a sheet. If you move the first sheet location to the last sheet location, then the other sheets are moved to the left. If you move from one sheet to a sheet next to it, then this behaves in a manner similar to a swap. The sheet index is zero‑based. Specify the from and to location using the sheet index. Moving a sheet does not change the sheet name.

The AllowSheetMove property of the FpSpread class can be set to true to allow the user to move the sheets using the sheet tabs. You can also hide a sheet. For more information, refer to Showing or Hiding a Sheet.

To move an existing sheet, complete the following instructions.

Using a Shortcut

Call the Sheets Move method (to move the sheet from one location to another).

Example

This example code moves the second sheet to the location of the third sheet.

C# Copy Code
// Move sheet 2 to the location of sheet 3.
FpSpread1.Sheets.Count = 5;
FpSpread1.Sheets.Move(2, 3);
VB Copy Code
' Move sheet 2 to the location of sheet 3.
FpSpread1.Sheets.Count = 5
FpSpread1.Sheets.Move(2, 3)

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.