[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IWorksheet.Move

Move Method

Move(IWorkbook)

Moves the worksheet to the end of the specified workbook, or to the end of the current workbook when no workbook is specified.

If null or the current workbook is specified, the worksheet is moved to the end of the current workbook.

Declaration
IWorksheet Move(IWorkbook workbook = null)
Function Move(Optional workbook As IWorkbook = Nothing) As IWorksheet
Parameters
Type Name Description
IWorkbook workbook

The workbook to which the worksheet will be moved, or null to move the worksheet to the end of the current workbook.

Returns
Type Description
IWorksheet

The moved worksheet.

Examples
worksheet.Name = "Summary";
worksheet.Range["A1:B2"].Value = new object[,] {
    {"Name", "Value"},
    {"Test", 100}
};
workbook.Worksheets.Add().Name = "Overview";
IWorkbook targetWorkbook = new Workbook();
IWorksheet movedSheet = worksheet.Move(targetWorkbook);