Back to Devexpress

Sheet.MoveBefore(String) Method

officefileapi-devexpress-dot-spreadsheet-dot-sheet-dot-movebefore-x28-system-dot-string-x29.md

latest2.7 KB
Original Source

Sheet.MoveBefore(String) Method

Moves the current sheet before the specified sheet in a workbook.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
void MoveBefore(
    string sheetName
)
vb
Sub MoveBefore(
    sheetName As String
)

Parameters

NameTypeDescription
sheetNameString

A string specifying the name of the sheet before which the current sheet should be inserted. If a sheet under the specified name is not found, an exception occurs.

|

Remarks

The table below lists methods of the Sheet object that allow you to rearrange worksheets and chart sheets within a workbook.

MethodDescription
MoveBeforeMoves the sheet before the specified sheet in a workbook.
Sheet.MoveAfterMoves the sheet after the specified sheet in a workbook.
Sheet.MoveToBeginningMoves the sheet to the first position within a workbook.
Sheet.MoveToEndMoves the sheet to the last position within a workbook.

You can also use the Worksheet.Move and ChartSheet.Move methods to relocate worksheets and chart sheet within the WorksheetCollection and ChartSheetCollection collections, respectively.

See Also

Worksheet.Move

ChartSheet.Move

How to: Move a Worksheet to Another Location in a Workbook

Sheet Interface

Sheet Members

DevExpress.Spreadsheet Namespace