# GC.Spread.Sheets.Commands

## Content

# Namespace: Commands

[Spread](GC.Spread).[Sheets](GC.Spread.Sheets).Commands

## Table of contents

### Variables

- [DefineColumn](GC.Spread.Sheets.Commands#definecolumn)
- [ModifyColumn](GC.Spread.Sheets.Commands#modifycolumn)
- [RemoveColumn](GC.Spread.Sheets.Commands#removecolumn)
- [autoFitColumn](GC.Spread.Sheets.Commands#autofitcolumn)
- [autoFitRow](GC.Spread.Sheets.Commands#autofitrow)
- [cancelInput](GC.Spread.Sheets.Commands#cancelinput)
- [changeFormulaReference](GC.Spread.Sheets.Commands#changeformulareference)
- [clear](GC.Spread.Sheets.Commands#clear)
- [clearAndEditing](GC.Spread.Sheets.Commands#clearandediting)
- [clearValues](GC.Spread.Sheets.Commands#clearvalues)
- [clipboardPaste](GC.Spread.Sheets.Commands#clipboardpaste)
- [commitArrayFormula](GC.Spread.Sheets.Commands#commitarrayformula)
- [commitInputNavigationDown](GC.Spread.Sheets.Commands#commitinputnavigationdown)
- [commitInputNavigationUp](GC.Spread.Sheets.Commands#commitinputnavigationup)
- [copy](GC.Spread.Sheets.Commands#copy)
- [copySheet](GC.Spread.Sheets.Commands#copysheet)
- [cut](GC.Spread.Sheets.Commands#cut)
- [deleteFloatingObjects](GC.Spread.Sheets.Commands#deletefloatingobjects)
- [dragCopyFloatingObjects](GC.Spread.Sheets.Commands#dragcopyfloatingobjects)
- [dragDrop](GC.Spread.Sheets.Commands#dragdrop)
- [editCell](GC.Spread.Sheets.Commands#editcell)
- [expandColumnOutline](GC.Spread.Sheets.Commands#expandcolumnoutline)
- [expandColumnOutlineForLevel](GC.Spread.Sheets.Commands#expandcolumnoutlineforlevel)
- [expandRowOutline](GC.Spread.Sheets.Commands#expandrowoutline)
- [expandRowOutlineForLevel](GC.Spread.Sheets.Commands#expandrowoutlineforlevel)
- [fill](GC.Spread.Sheets.Commands#fill)
- [moveFloatingObjects](GC.Spread.Sheets.Commands#movefloatingobjects)
- [moveSheet](GC.Spread.Sheets.Commands#movesheet)
- [moveToNextCell](GC.Spread.Sheets.Commands#movetonextcell)
- [moveToNextCellThenControl](GC.Spread.Sheets.Commands#movetonextcellthencontrol)
- [moveToPreviousCell](GC.Spread.Sheets.Commands#movetopreviouscell)
- [moveToPreviousCellThenControl](GC.Spread.Sheets.Commands#movetopreviouscellthencontrol)
- [navigationBottom](GC.Spread.Sheets.Commands#navigationbottom)
- [navigationDown](GC.Spread.Sheets.Commands#navigationdown)
- [navigationEnd](GC.Spread.Sheets.Commands#navigationend)
- [navigationEnd2](GC.Spread.Sheets.Commands#navigationend2)
- [navigationFirst](GC.Spread.Sheets.Commands#navigationfirst)
- [navigationHome](GC.Spread.Sheets.Commands#navigationhome)
- [navigationHome2](GC.Spread.Sheets.Commands#navigationhome2)
- [navigationLast](GC.Spread.Sheets.Commands#navigationlast)
- [navigationLeft](GC.Spread.Sheets.Commands#navigationleft)
- [navigationNextSheet](GC.Spread.Sheets.Commands#navigationnextsheet)
- [navigationPageDown](GC.Spread.Sheets.Commands#navigationpagedown)
- [navigationPageUp](GC.Spread.Sheets.Commands#navigationpageup)
- [navigationPreviousSheet](GC.Spread.Sheets.Commands#navigationprevioussheet)
- [navigationRight](GC.Spread.Sheets.Commands#navigationright)
- [navigationTop](GC.Spread.Sheets.Commands#navigationtop)
- [navigationUp](GC.Spread.Sheets.Commands#navigationup)
- [openCalculator](GC.Spread.Sheets.Commands#opencalculator)
- [openColorPicker](GC.Spread.Sheets.Commands#opencolorpicker)
- [openDateTimePicker](GC.Spread.Sheets.Commands#opendatetimepicker)
- [openList](GC.Spread.Sheets.Commands#openlist)
- [openMonthPicker](GC.Spread.Sheets.Commands#openmonthpicker)
- [openMultiColumn](GC.Spread.Sheets.Commands#openmulticolumn)
- [openPasteSpecialDialog](GC.Spread.Sheets.Commands#openpastespecialdialog)
- [openSlider](GC.Spread.Sheets.Commands#openslider)
- [openTimePicker](GC.Spread.Sheets.Commands#opentimepicker)
- [openUrl](GC.Spread.Sheets.Commands#openurl)
- [openWorkflowList](GC.Spread.Sheets.Commands#openworkflowlist)
- [outlineColumn](GC.Spread.Sheets.Commands#outlinecolumn)
- [outlineRow](GC.Spread.Sheets.Commands#outlinerow)
- [paste](GC.Spread.Sheets.Commands#paste)
- [pasteFloatingObjects](GC.Spread.Sheets.Commands#pastefloatingobjects)
- [redo](GC.Spread.Sheets.Commands#redo)
- [removeColumnOutline](GC.Spread.Sheets.Commands#removecolumnoutline)
- [removeRowOutline](GC.Spread.Sheets.Commands#removerowoutline)
- [renameSheet](GC.Spread.Sheets.Commands#renamesheet)
- [resizeColumn](GC.Spread.Sheets.Commands#resizecolumn)
- [resizeFloatingObjects](GC.Spread.Sheets.Commands#resizefloatingobjects)
- [resizeRow](GC.Spread.Sheets.Commands#resizerow)
- [selectNextControl](GC.Spread.Sheets.Commands#selectnextcontrol)
- [selectPreviousControl](GC.Spread.Sheets.Commands#selectpreviouscontrol)
- [selectionBottom](GC.Spread.Sheets.Commands#selectionbottom)
- [selectionDown](GC.Spread.Sheets.Commands#selectiondown)
- [selectionEnd](GC.Spread.Sheets.Commands#selectionend)
- [selectionFirst](GC.Spread.Sheets.Commands#selectionfirst)
- [selectionHome](GC.Spread.Sheets.Commands#selectionhome)
- [selectionLast](GC.Spread.Sheets.Commands#selectionlast)
- [selectionLeft](GC.Spread.Sheets.Commands#selectionleft)
- [selectionPageDown](GC.Spread.Sheets.Commands#selectionpagedown)
- [selectionPageUp](GC.Spread.Sheets.Commands#selectionpageup)
- [selectionRight](GC.Spread.Sheets.Commands#selectionright)
- [selectionTop](GC.Spread.Sheets.Commands#selectiontop)
- [selectionUp](GC.Spread.Sheets.Commands#selectionup)
- [splitResizeColumn](GC.Spread.Sheets.Commands#splitresizecolumn)
- [splitResizeRow](GC.Spread.Sheets.Commands#splitresizerow)
- [tableDeleteColumns](GC.Spread.Sheets.Commands#tabledeletecolumns)
- [tableDeleteRows](GC.Spread.Sheets.Commands#tabledeleterows)
- [tableInsertColumns](GC.Spread.Sheets.Commands#tableinsertcolumns)
- [tableInsertRows](GC.Spread.Sheets.Commands#tableinsertrows)
- [tableResize](GC.Spread.Sheets.Commands#tableresize)
- [undo](GC.Spread.Sheets.Commands#undo)
- [zoom](GC.Spread.Sheets.Commands#zoom)

### Functions

- [endTransaction](GC.Spread.Sheets.Commands#endtransaction)
- [startTransaction](GC.Spread.Sheets.Commands#starttransaction)
- [undoTransaction](GC.Spread.Sheets.Commands#undotransaction)

## Variables

### <a id="definecolumn" name="definecolumn"></a> DefineColumn

• **DefineColumn**: `Object`

Represents the command used to define the column.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The specified col for inserting, optional.

**`param`** The defined column.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the define column action.
// define the column properties
spread.commandManager().execute({cmd: "DefineColumn", sheetName: "Sheet1", { col: 1, column: { value: 'column1' }}});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col?`: `number` ; `column`: [`IColumn`](GC.Data#icolumn) ; `sheetName`: `string`  }) => `any` |

___

### <a id="modifycolumn" name="modifycolumn"></a> ModifyColumn

• **ModifyColumn**: `Object`

Represents the command used to modify the column.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The specified col.

**`param`** The modified column.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the modify column action.
// modify the column properties
spread.commandManager().execute({cmd: "ModifyColumn", sheetName: "Sheet1", { col: 1, column: { value: 'column1' }}});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col`: `number` ; `column`: [`IColumn`](GC.Data#icolumn) ; `sheetName`: `string`  }) => `any` |

___

### <a id="removecolumn" name="removecolumn"></a> RemoveColumn

• **RemoveColumn**: `Object`

Represents the command used to remove the column.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The specified col.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the remove column action.
// remove the column properties
spread.commandManager().execute({cmd: "RemoveColumn", sheetName: "Sheet1", { col: 1 }});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col`: `number` ; `sheetName`: `string`  }) => `any` |

___

### <a id="autofitcolumn" name="autofitcolumn"></a> autoFitColumn

• **autoFitColumn**: `Object`

Represents the command used to automatically resize the column in a sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The resize columns; each item is an object which has a col.

**`param`** Whether the resized columns are in the row header area.

**`param`** Whether the auto-fit action includes the header text.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
var columns = [ { col: 3 } ];
spread.options.allowUndo = true;
spread.commandManager().execute({cmd: "autoFitColumn", sheetName: "Sheet1", columns: columns, rowHeader: false, autoFitType: GC.Spread.Sheets.AutoFitType.cell});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `autoFitType`: [`AutoFitType`](../enums/GC.Spread.Sheets.AutoFitType) ; `columns`: `Object`[] ; `rowHeader`: `boolean` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="autofitrow" name="autofitrow"></a> autoFitRow

• **autoFitRow**: `Object`

Represents the command used to automatically resize the row in a sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The resize rows; each item is an object which has a row.

**`param`** Whether the resized rows are in the column header area.

**`param`** Whether the auto-fit action includes the header text.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
spread.options.allowUndo = true;
var rows = [ { row: 3 } ];
spread.commandManager().execute({cmd: "autoFitRow", sheetName: "Sheet1", rows: rows, columnHeader: false, autoFitType: GC.Spread.Sheets.AutoFitType.cell});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `autoFitType`: [`AutoFitType`](../enums/GC.Spread.Sheets.AutoFitType) ; `columnHeader`: `boolean` ; `rows`: `Object`[] ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="cancelinput" name="cancelinput"></a> cancelInput

• **cancelInput**: `Object`

Represents the command used to stop cell editing and cancel input.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// stop cell editing with invoking command
// this sample will cancel the input editor after 2 Second
activeSheet.setValue(0, 0, '12312');
activeSheet.startEdit();
window.setTimeout(function() {
    spread.commandManager().execute({ cmd: "cancelInput", sheetName: "Sheet1" });
}, 2000);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="changeformulareference" name="changeformulareference"></a> changeFormulaReference

• **changeFormulaReference**: `Object`

Represents the command used to switch the formula reference between relative, absolute, and mixed when editing formulas.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.
//This example uses the changeFormulaReference action to switch the formula reference.
spread.commandManager().execute({cmd: "changeFormulaReference", sheetName: "Sheet1"});

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="clear" name="clear"></a> clear

• **clear**: `Object`

Represents the command used to clear the cell value.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// clear selected cells with the tab key
spread.commandManager().setShortcutKey('clear', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key

// clear selected cells with invoking command
spread.commandManager().execute({cmd: "clear", sheetName: "Sheet1"});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="clearandediting" name="clearandediting"></a> clearAndEditing

• **clearAndEditing**: `Object`

Represents the command used to clear the active cell value and enters edit mode.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// clear active cell and enter edit mode with invoking command
spread.commandManager().execute({cmd: "clearAndEditing", sheetName: "Sheet1"});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="clearvalues" name="clearvalues"></a> clearValues

• **clearValues**: `Object`

Represents the command used to clear cell values on a worksheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The clear cell value ranges whose item type is GC.Spread.Sheets.Range.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
spread.options.allowUndo = true;
spread.commandManager().execute({cmd: "clearValues", sheetName: "Sheet1", ranges: [new GC.Spread.Sheets.Range(8, 5, 2, 1)]});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `ranges`: [`Range`](../classes/GC.Spread.Sheets.Range)[] ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="clipboardpaste" name="clipboardpaste"></a> clipboardPaste

• **clipboardPaste**: `Object`

Represents the command used for a Clipboard paste on the worksheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The source sheet.

**`param`** The source range array which item type is GC.Spread.Sheets.Range.

**`param`** The target range array which item type is GC.Spread.Sheets.Range.

**`param`** Whether the operation is cutting or copying.

**`param`** The text on the clipboard.

**`param`** The Clipboard pasting option that indicates which content to paste.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the clipboardPaste method.
activeSheet.setValue(0, 0, 1, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(1, 0, 2, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setFormula(2, 0, "=A1+A2", GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(0, 1, 3, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(1, 1, 4, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setFormula(2, 1, "=B1+B2", GC.Spread.Sheets.SheetArea.viewport);
var fromRange = [new GC.Spread.Sheets.Range(0, 0, 3, 2)];
var toRanges = [new GC.Spread.Sheets.Range(5, 0, 3, 2)];
$("#button1").click(function () {
    //Cut Paste Action
    spread.commandManager().execute({cmd: "clipboardPaste", sheetName: "Sheet1", fromSheet: activeSheet, fromRanges: fromRange, pastedRanges: toRanges, isCutting: true, clipboardText: "", pasteOption: GC.Spread.Sheets.ClipboardPasteOptions.all});
});
$("#button2").click(function () {
    spread.commandManager().execute({cmd: "clipboardPaste", sheetName: "Sheet1", fromSheet: activeSheet, fromRanges: fromRange, pastedRanges: toRanges, isCutting: false, clipboardText: "", pasteOption: GC.Spread.Sheets.ClipboardPasteOptions.all});
});
//Add button controls to page
&lt;input type="button" id="button1" value="button1"/&gt;
&lt;input type="button" id="button2" value="button2"/&gt;
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `clipboardText`: `string` ; `fromRanges`: [`Range`](../classes/GC.Spread.Sheets.Range)[] ; `fromSheet`: [`Worksheet`](../classes/GC.Spread.Sheets.Worksheet) ; `isCutting`: `boolean` ; `pasteOption`: [`ClipboardPasteOptions`](../enums/GC.Spread.Sheets.ClipboardPasteOptions) ; `pastedRanges`: [`Range`](../classes/GC.Spread.Sheets.Range)[] ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="commitarrayformula" name="commitarrayformula"></a> commitArrayFormula

• **commitArrayFormula**: `Object`

Represents the command used to commit the cell editing and sets the array formula to the active range.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// commit the cell editing and sets the array formula to the active range with invoking command
spread.commandManager().execute({cmd: "commitArrayFormula", sheetName: "Sheet1"});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="commitinputnavigationdown" name="commitinputnavigationdown"></a> commitInputNavigationDown

• **commitInputNavigationDown**: `Object`

Represents the command used to stop cell editing and moves the active cell to the next row.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// stop cell editing and moves the active cell to the next row with invoking command
activeSheet.setValue(1, 1, '12312');
activeSheet.setActiveCell(1,1);
activeSheet.startEdit();
window.setTimeout(function() {
    spread.commandManager().execute({cmd: "commitInputNavigationDown", sheetName: "Sheet1"});
}, 1000);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="commitinputnavigationup" name="commitinputnavigationup"></a> commitInputNavigationUp

• **commitInputNavigationUp**: `Object`

Represents the command used to stop cell editing and moves the active cell to the previous row.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// stop cell editing and moves the active cell to the previous row with invoking command
activeSheet.setValue(1, 1, 'SpreadJS');
activeSheet.setActiveCell(1,1);
activeSheet.startEdit();
window.setTimeout(function() {
    spread.commandManager().execute({cmd: "commitInputNavigationUp", sheetName: "Sheet1"});
}, 1000);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="copy" name="copy"></a> copy

• **copy**: `Object`

Represents the command used to copy the selected item text to the Clipboard.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// copy the selected items text to the Clipboard with invoking command
spread.commandManager().execute({cmd: "copy", sheetName: "Sheet1"});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="copysheet" name="copysheet"></a> copySheet

• **copySheet**: `Object`

Represents the command used to copy sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The clone sheet name.

**`param`** The target index.

**`param`** The new sheet name.

**`param`** Whether to bind data source to clone sheet

**`example`**
```
//This example copy a sheet.
spread.commandManager().execute({cmd: "copySheet", sheetName: "Sheet1", targetIndex: targetIndex, newName: "Sheet1 (2)", includeBindingSource: true});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `includeBindingSource`: `boolean` ; `newName`: `string` ; `sheetName`: `string` ; `targetIndex`: `number`  }) => `void` |

___

### <a id="cut" name="cut"></a> cut

• **cut**: `Object`

Represents the command used to cut the selected item text to the Clipboard.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// cut the selected items text to the Clipboard with invoking command
spread.commandManager().execute({cmd: "cut", sheetName: "Sheet1"});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="deletefloatingobjects" name="deletefloatingobjects"></a> deleteFloatingObjects

• **deleteFloatingObjects**: `Object`

Represents the command for deleting the floating objects.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// delete the floating objects with invoking command
spread.commandManager().execute({cmd: "deleteFloatingObjects", sheetName: "Sheet1"});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="dragcopyfloatingobjects" name="dragcopyfloatingobjects"></a> dragCopyFloatingObjects

• **dragCopyFloatingObjects**: `Object`

Represents the command used to drag and copy the floating objects on the sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The names array of floating objects.

**`param`** The horizontal offset.

**`param`** The vertical offset.

**`param`** `true` if this is an undo operation; otherwise `false`.

**`example`**
```
// copy floating objects with invoking command
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("floatingObject1", 10, 10, 60, 64);
var div = document.createElement('div');
div.innerHTML = '<span> SpreadJS supports FloatingObject.</span>'+
'<div style="border: 1px dotted  gray; width: 60%; height:70%; margin:auto;">' +
'<ul><li>First list</li></ul><ul><li>Second list</li></ul></div>';
customFloatingObject.content(div);
activeSheet.floatingObjects.add(customFloatingObject);
spread.commandManager().execute({cmd: "dragCopyFloatingObjects", sheetName: "Sheet1", floatingObjects: ["floatingObject1"], offsetX: 100, offsetY: 200});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `floatingObjects`: `string`[] ; `offsetX`: `number` ; `offsetY`: `number` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="dragdrop" name="dragdrop"></a> dragDrop

• **dragDrop**: `Object`

Represents the command used to drag a range and drop it onto another range on the worksheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.
commandOptions {Object} The options of the operation.
commandOptions.sheetName {string} The sheet name.
commandOptions.fromRow {number} The source row index for the drag drop.
commandOptions.fromColumn {number} The source column index for the drag drop.
commandOptions.toRow {number} The destination row index for the drag drop.
commandOptions.toColumn {number} The destination column index for the drag drop.
commandOptions.rowCount {number} The row count for the drag drop.
commandOptions.columnCount {number} The column count for the drag drop.
commandOptions.copy {boolean} If set to `true` copy; otherwise, cut if `false`.
commandOptions.insert {boolean} If set to `true` inserts the drag data in the drop row or column.
commandOptions.option {GC.Spread.Sheets.CopyToOptions} Indicates the content type to drag and drop.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
spread.options.allowUndo = true;
spread.commandManager().execute({cmd: "dragDrop",  sheetName: "Sheet1", fromRow:2, fromColumn:1, toRow:12, toColumn:2, rowCount:2, columnCount:2, copy: true, insert: false, option: GC.Spread.Sheets.CopyToOptions.value});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `columnCount`: `number` ; `copy`: `boolean` ; `fromColumn`: `number` ; `fromRow`: `number` ; `insert`: `boolean` ; `option`: [`CopyToOptions`](../enums/GC.Spread.Sheets.CopyToOptions) ; `rowCount`: `number` ; `sheetName`: `string` ; `toColumn`: `number` ; `toRow`: `number`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="editcell" name="editcell"></a> editCell

• **editCell**: `Object`

Represents the command used to apply a new value to a cell on the worksheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The row index of the cell.

**`param`** The column index of the cell.

**`param`** The new value of the cell.

**`param`** Whether to format the new value automatically.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// apply a new value to a cell with invoking command
spread.commandManager().execute({cmd: "editCell", sheetName: "Sheet1", row: 1, col: 1, newValue: "123", autoFormat: true});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `autoFormat`: `boolean` ; `col`: `number` ; `newValue`: `any` ; `row`: `number` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="expandcolumnoutline" name="expandcolumnoutline"></a> expandColumnOutline

• **expandColumnOutline**: `Object`

Represents the command to expand or collapse a column range group.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The outline summary index.

**`param`** The outline level.

**`param`** Whether to make the outline collapsed or expanded.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// collapse a column range group with invoking command
spread.commandManager().execute({cmd: "expandColumnOutline", sheetName: "Sheet1", index: 5, level: 0, collapsed: true});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `collapsed`: `boolean` ; `index`: `number` ; `level`: `number` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="expandcolumnoutlineforlevel" name="expandcolumnoutlineforlevel"></a> expandColumnOutlineForLevel

• **expandColumnOutlineForLevel**: `Object`

Represents the command used to expand or collapse column range groups on the same level.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The outline level.

**`param`** `true` if this an undo operation; otherwise, `false`.

**`example`**
```
// expand or collapse a column range group with invoking command
spread.commandManager().execute({cmd: "expandColumnOutlineForLevel", sheetName: "Sheet1", level: 0});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `level`: `number` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="expandrowoutline" name="expandrowoutline"></a> expandRowOutline

• **expandRowOutline**: `Object`

Represents the command to expand or collapse a row range group.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The outline summary index.

**`param`** The outline level.

**`param`** Whether to make the outline collapsed or expanded.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// expand a row range group with invoking command
spread.commandManager().execute({cmd: "expandRowOutline", sheetName: "Sheet1", index: 5, level: 0, collapsed: false});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `collapsed`: `boolean` ; `index`: `number` ; `level`: `number` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="expandrowoutlineforlevel" name="expandrowoutlineforlevel"></a> expandRowOutlineForLevel

• **expandRowOutlineForLevel**: `Object`

Represents the command used to expand or collapse row range groups on the same level.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The outline level.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// expand or collapse a row range group with invoking command
spread.commandManager().execute({cmd: "expandRowOutlineForLevel", sheetName: "Sheet1", level: 0});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `level`: `number` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="fill" name="fill"></a> fill

• **fill**: `Object`

Represents the command used to drag and fill a range on the sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The start range.

**`param`** The fill range.

**`param`** The auto fill type.

**`param`** The fill direction.

**`param`** `true` if an undo operation; otherwise, `false`.

**`example`**
```
spread.options.allowUndo = true;
var srange = new GC.Spread.Sheets.Range(10, 5, 1, 1);
var frange = new GC.Spread.Sheets.Range(11, 5, 5, 1);
spread.commandManager().execute({cmd: "fill", sheetName: "Sheet1", startRange: srange, fillRange: frange, autoFillType: GC.Spread.Sheets.Fill.AutoFillType.fillSeries, fillDirection: GC.Spread.Sheets.Fill.FillDirection.down });
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `autoFillType`: [`AutoFillType`](../enums/GC.Spread.Sheets.Fill.AutoFillType) ; `fillDirection`: [`FillDirection`](../enums/GC.Spread.Sheets.Fill.FillDirection) ; `fillRange`: [`Range`](../classes/GC.Spread.Sheets.Range) ; `sheetName`: `string` ; `startRange`: [`Range`](../classes/GC.Spread.Sheets.Range)  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="movefloatingobjects" name="movefloatingobjects"></a> moveFloatingObjects

• **moveFloatingObjects**: `Object`

Represents the command for moving floating objects.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The names array of floating objects.

**`param`** The horizontal offset.

**`param`** The vertical offset.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// move floating objects with invoking command
spread.commandManager().execute({cmd: "moveFloatingObjects", sheetName: "Sheet1", floatingObjects: ["floatingObject1", "floatingObject2"], offsetX: 10, offsetY: 20});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `floatingObjects`: `string`[] ; `offsetX`: `number` ; `offsetY`: `number` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="movesheet" name="movesheet"></a> moveSheet

• **moveSheet**: `Object`

Represents the command used to move sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The target index.

**`example`**
```
//This example move a sheet.
spread.commandManager().execute({cmd: "moveSheet", sheetName: "Sheet1", targetIndex: targetIndex});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string` ; `targetIndex`: `number`  }) => `boolean` |

___

### <a id="movetonextcell" name="movetonextcell"></a> moveToNextCell

• **moveToNextCell**: `Object`

Represents the command used to move the active cell to the next cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example maps the moveToNextCell action.
spread.focus();
spread.commandManager().setShortcutKey('moveToNextCell', GC.Spread.Commands.Key.a, false, false, false, false); // a

// move the active cell to the next cell with invoking command
spread.commandManager().execute({cmd: "moveToNextCell", sheetName: "Sheet1"});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="movetonextcellthencontrol" name="movetonextcellthencontrol"></a> moveToNextCellThenControl

• **moveToNextCellThenControl**: `Object`

Represents the command used to select the next control if the active cell is the last visible cell; otherwise, move the active cell to the next cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example maps the moveToNextCellThenControl action.
spread.commandManager().setShortcutKey('moveToNextCellThenControl', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
spread.commandManager().setShortcutKey('moveToPreviousCellThenControl', GC.Spread.Commands.Key.tab, false, true, false, false); // Shift key and Tab key
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="movetopreviouscell" name="movetopreviouscell"></a> moveToPreviousCell

• **moveToPreviousCell**: `Object`

Represents the command used to move the active cell to the previous cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the moveToPreviousCell action.
spread.commandManager().setShortcutKey('moveToPreviousCell', GC.Spread.Commands.Key.a, false, false, false, false); // a

// move the active cell to the previous cell with invoking command
spread.commandManager().execute({cmd: "moveToPreviousCell", sheetName: "Sheet1"});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="movetopreviouscellthencontrol" name="movetopreviouscellthencontrol"></a> moveToPreviousCellThenControl

• **moveToPreviousCellThenControl**: `Object`

Represents the command used to select the previous control if the active cell is the first visible cell; otherwise, move the active cell to the previous cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example maps the moveToPreviousCellThenControl action.
spread.commandManager().setShortcutKey('moveToNextCellThenControl', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
spread.commandManager().setShortcutKey('moveToPreviousCellThenControl', GC.Spread.Commands.Key.tab, false, true, false, false); // Shift key and Tab key
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationbottom" name="navigationbottom"></a> navigationBottom

• **navigationBottom**: `Object`

Represents the command used to move the active cell to the last row.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example maps the navigationBottom action to the Tab key.
spread.commandManager().setShortcutKey('navigationDown', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
spread.commandManager().setShortcutKey('navigationBottom', GC.Spread.Commands.Key.tab, false, true, false, false); // Shift key and Tab key
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationdown" name="navigationdown"></a> navigationDown

• **navigationDown**: `Object`

Represents the command used to move the active cell to the next row.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example maps the navigationDown key.
spread.commandManager().setShortcutKey('navigationDown', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
spread.commandManager().setShortcutKey('navigationBottom', GC.Spread.Commands.Key.tab, false, true, false, false); // Shift key and Tab key
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationend" name="navigationend"></a> navigationEnd

• **navigationEnd**: `Object`

Represents the command used to move the active cell to the last column.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the navigationEnd method.
spread.commandManager().setShortcutKey('navigationEnd', GC.Spread.Commands.Key.tab,  false, false, false, false); // Tab key
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationend2" name="navigationend2"></a> navigationEnd2

• **navigationEnd2**: `Object`

Represents the command used to move the active cell to the last column without regard to frozen trailing columns.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the navigationEnd2 action.
spread.commandManager().setShortcutKey("navigationEnd2", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationfirst" name="navigationfirst"></a> navigationFirst

• **navigationFirst**: `Object`

Represents the command used to move the active cell to the first cell in the sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the navigationFirst action.
spread.commandManager().setShortcutKey("navigationFirst", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationhome" name="navigationhome"></a> navigationHome

• **navigationHome**: `Object`

Represents the command used to move the active cell to the first column.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the navigationHome action.
spread.commandManager().setShortcutKey("navigationHome", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationhome2" name="navigationhome2"></a> navigationHome2

• **navigationHome2**: `Object`

Represents the command used to move the active cell to the first column without regard to frozen columns.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the navigationHome2 action.
spread.commandManager().setShortcutKey("navigationHome2", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationlast" name="navigationlast"></a> navigationLast

• **navigationLast**: `Object`

Represents the command used to move the active cell to the last cell in the sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the navigationLast action.
spread.commandManager().setShortcutKey("navigationLast", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationleft" name="navigationleft"></a> navigationLeft

• **navigationLeft**: `Object`

Represents the command used to move the active cell to the previous column.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the navigationLeft action.
spread.commandManager().setShortcutKey("navigationLeft", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationnextsheet" name="navigationnextsheet"></a> navigationNextSheet

• **navigationNextSheet**: `Object`

Represents the command used to move the active sheet to the next sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the navigationNextSheet action.
spread.commandManager().setShortcutKey("navigationNextSheet", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationpagedown" name="navigationpagedown"></a> navigationPageDown

• **navigationPageDown**: `Object`

Represents the command used to move the active cell down one page of rows.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the navigationPageDown action.
spread.commandManager().setShortcutKey("navigationPageDown", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationpageup" name="navigationpageup"></a> navigationPageUp

• **navigationPageUp**: `Object`

Represents the command used to move the active cell up one page of rows.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the navigationPageUp action.
spread.commandManager().setShortcutKey("navigationPageUp", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationprevioussheet" name="navigationprevioussheet"></a> navigationPreviousSheet

• **navigationPreviousSheet**: `Object`

Represents the command used to move the active sheet to the previous sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the navigationPreviousSheet action.
spread.commandManager().setShortcutKey("navigationNextSheet", GC.Spread.Commands.Key.a, false, false, false, false);
spread.commandManager().setShortcutKey("navigationPreviousSheet", GC.Spread.Commands.Key.c, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="navigationright" name="navigationright"></a> navigationRight

• **navigationRight**: `Object`

Represents the command used to move the active cell to the next column.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the navigationRight action.
spread.commandManager().setShortcutKey("navigationRight", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationtop" name="navigationtop"></a> navigationTop

• **navigationTop**: `Object`

Represents the command used to move the active cell to the first row.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the navigationTop action.
spread.commandManager().setShortcutKey("navigationTop", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="navigationup" name="navigationup"></a> navigationUp

• **navigationUp**: `Object`

Represents the command used to move the active cell to the previous row.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example maps the navigationUp action to a.
spread.commandManager().setShortcutKey('navigationUp', GC.Spread.Commands.Key.a, false, false, false, false); // a
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="opencalculator" name="opencalculator"></a> openCalculator

• **openCalculator**: `Object`

Represents the command used to open a calculator picker in specified cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The sheet area.

**`param`** The rowIndex.

**`param`** The columnIndex.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// open a calculator with invoking command
spread.commandManager().execute({cmd: "openCalculator", sheetName: "Sheet1", row: 1, col: 2});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col`: `number` ; `row`: `number` ; `sheetArea`: [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="opencolorpicker" name="opencolorpicker"></a> openColorPicker

• **openColorPicker**: `Object`

Represents the command used to open a color picker in specified cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The sheet area.

**`param`** The rowIndex.

**`param`** The columnIndex.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// open a color picker with invoking command
spread.commandManager().execute({cmd: "openColorPicker", sheetName: "Sheet1", row: 1, col: 2});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col`: `number` ; `row`: `number` ; `sheetArea`: [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="opendatetimepicker" name="opendatetimepicker"></a> openDateTimePicker

• **openDateTimePicker**: `Object`

Represents the command used to open a datetime picker in specified cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The sheet area.

**`param`** The rowIndex.

**`param`** The columnIndex.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// open a dateTimePicker with invoking command
spread.commandManager().execute({cmd: "openDateTimePicker", sheetName: "Sheet1", row: 1, col: 2});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col`: `number` ; `row`: `number` ; `sheetArea`: [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="openlist" name="openlist"></a> openList

• **openList**: `Object`

Represents the command used to open a list picker in specified cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The sheet area.

**`param`** The rowIndex.

**`param`** The columnIndex.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// open a list with invoking command
spread.commandManager().execute({cmd: "openList", sheetName: "Sheet1", row: 1, col: 2});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col`: `number` ; `row`: `number` ; `sheetArea`: [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="openmonthpicker" name="openmonthpicker"></a> openMonthPicker

• **openMonthPicker**: `Object`

Represents the command used to open a month picker in specified cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The sheet area.

**`param`** The rowIndex.

**`param`** The columnIndex.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// open a month picker with invoking command
spread.commandManager().execute({cmd: "openMonthPicker", sheetName: "Sheet1", row: 1, col: 2});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col`: `number` ; `row`: `number` ; `sheetArea`: [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="openmulticolumn" name="openmulticolumn"></a> openMultiColumn

• **openMultiColumn**: `Object`

Represents the command used to open a multi-column list picker in specified cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The sheet area.

**`param`** The rowIndex.

**`param`** The columnIndex.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// open a MultiColumn with invoking command
spread.commandManager().execute({cmd: "openMultiColumn", sheetName: "Sheet1", row: 1, col: 2});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col`: `number` ; `row`: `number` ; `sheetArea`: [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="openpastespecialdialog" name="openpastespecialdialog"></a> openPasteSpecialDialog

• **openPasteSpecialDialog**: `Object`

Represents the command used to open paste special dialog.

**`param`** The context of the operation.

**`example`**
```
//This example opens the paste special dialog.
spread.commandManager().execute({cmd: "openPasteSpecialDialog", sheetName: spread.getActiveSheet().name()});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook)) => `void` |

___

### <a id="openslider" name="openslider"></a> openSlider

• **openSlider**: `Object`

Represents the command used to open a slider picker in specified cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The sheet area.

**`param`** The rowIndex.

**`param`** The columnIndex.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// open a slider with invoking command
spread.commandManager().execute({cmd: "openSlider", sheetName: "Sheet1", row: 1, col: 2});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col`: `number` ; `row`: `number` ; `sheetArea`: [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="opentimepicker" name="opentimepicker"></a> openTimePicker

• **openTimePicker**: `Object`

Represents the command used to open a time picker in specified cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The sheet area.

**`param`** The rowIndex.

**`param`** The columnIndex.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// open a TimePicker with invoking command
spread.commandManager().execute({cmd: "openTimePicker", sheetName: "Sheet1", row: 1, col: 2});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col`: `number` ; `row`: `number` ; `sheetArea`: [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="openurl" name="openurl"></a> openUrl

• **openUrl**: `Object`

Represents the command used to open the url of the hyperlink cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The url string.

**`param`** The target type, it's default is blank.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// clear open the url of the hyperlink cell with invoking command
spread.commandManager().execute({cmd: "openUrl", sheetName: "Sheet1", url: "https://www.spreadjs.com", target: GC.Spread.Sheets.Hyperlink.HyperlinkTargetType.blank});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string` ; `target?`: [`HyperlinkTargetType`](../enums/GC.Spread.Sheets.Hyperlink.HyperlinkTargetType) ; `url`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="openworkflowlist" name="openworkflowlist"></a> openWorkflowList

• **openWorkflowList**: `Object`

Represents the command used to open a workflow list picker in specified cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The sheet area.

**`param`** The rowIndex.

**`param`** The columnIndex.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// open a color picker with invoking command
spread.commandManager().execute({cmd: "openWorkflowList", sheetName: "Sheet1", row: 1, col: 2});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col`: `number` ; `row`: `number` ; `sheetArea`: [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="outlinecolumn" name="outlinecolumn"></a> outlineColumn

• **outlineColumn**: `Object`

Represents the command for grouping a column outline (range group) on a sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The outline starting index.

**`param`** The number of rows or columns to group or ungroup in the outline.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example creates a group.
spread.options.allowUndo = true;
spread.commandManager().execute({cmd: "outlineColumn", sheetName: "Sheet1", index: 3, count: 5});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `count`: `number` ; `index`: `number` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="outlinerow" name="outlinerow"></a> outlineRow

• **outlineRow**: `Object`

Represents the command for grouping a row outline (range group) on a sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The outline starting index.

**`param`** The number of rows or columns to group or ungroup in the outline.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example undoes an action.
spread.options.allowUndo = true;
spread.commandManager().execute({cmd: "outlineRow", sheetName: "Sheet1", index: 3, count: 5});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `count`: `number` ; `index`: `number` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="paste" name="paste"></a> paste

• **paste**: `Object`

Represents the command used to paste the selected items from the Clipboard to the current sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The inserted data needs to be moved in the direction.

**`param`** The option of paste.

**`param`** The pasting text of clipboard.

**`param`** The pasting HTML of clipboard.

**`param`**

**`param`** The option of paste operation.

**`param`** whether to skip the blank cells in the copied range without replacing the corresponding cells.

**`param`** whether to change columns of copied data to rows and vice versa.

**`param`** whether to paste cell references.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// paste the selected items from the Clipboard to the current sheet with invoking command
spread.commandManager().execute({cmd: "paste", sheetName: "Sheet1", pasteText: "test"});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `pasteOption`: [`ClipboardPasteOptions`](../enums/GC.Spread.Sheets.ClipboardPasteOptions) ; `pasteSpecialOptions`: `Object` ; `sheetName`: `string` ; `shiftCells?`: [`InsertShiftCell`](../enums/GC.Spread.Sheets.InsertShiftCell)  }) => `any` |

___

### <a id="pastefloatingobjects" name="pastefloatingobjects"></a> pasteFloatingObjects

• **pasteFloatingObjects**: `Object`

Represents the command for pasting the floating objects on the sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// paste the floating objects with invoking command
spread.commandManager().execute({cmd: "pasteFloatingObjects", sheetName: "Sheet1"});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="redo" name="redo"></a> redo

• **redo**: `Object`

Represents the command used to perform a redo of the most recently undone edit or action.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the redo command.
spread.commandManager().execute({cmd: "redo", sheetName: "Sheet1"});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="removecolumnoutline" name="removecolumnoutline"></a> removeColumnOutline

• **removeColumnOutline**: `Object`

Represents the command for ungrouping a column outline (range group) on a sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The outline starting index.

**`param`** The number of rows or columns to group or ungroup in the outline.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// ungroup a column outline with invoking command
spread.commandManager().execute({cmd: "removeColumnOutline", sheetName: "Sheet1", index: 1, count: 3});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `count`: `number` ; `index`: `number` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="removerowoutline" name="removerowoutline"></a> removeRowOutline

• **removeRowOutline**: `Object`

Represents the command for ungrouping a row outline (range group) on a sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The outline starting index.

**`param`** The number of rows or columns to group or ungroup in the outline.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// ungroup a row outline with invoking command
spread.commandManager().execute({cmd: "removeRowOutline", sheetName: "Sheet1", index: 1, count: 3});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `count`: `number` ; `index`: `number` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="renamesheet" name="renamesheet"></a> renameSheet

• **renameSheet**: `Object`

Represents the command used to rename a worksheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The sheet's new name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example renames a sheet.
spread.commandManager().execute({cmd: "renameSheet", sheetName: "Sheet1", name: "SheetName"});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `name`: `string` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="resizecolumn" name="resizecolumn"></a> resizeColumn

• **resizeColumn**: `Object`

Represents the command used to resize the column on a worksheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The resize columns; each item is an object which has firstCol and lastCol.

**`param`** The size of the column that is being resized.

**`param`** Whether the column being resized is in the row header area.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// resize the col with invoking command
spread.commandManager().execute({cmd: "resizeColumn", sheetName: "Sheet1", columns: [{firstCol: 1, lastCol: 5}], size: 200, rowHeader: false});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `columns`: `Object`[] ; `rowHeader`: `boolean` ; `sheetName`: `string` ; `size`: `number`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="resizefloatingobjects" name="resizefloatingobjects"></a> resizeFloatingObjects

• **resizeFloatingObjects**: `Object`

Represents the command for resizing floating objects.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The names array of floating objects.

**`param`** The offset left.

**`param`** The offset top.

**`param`** The offset width.

**`param`** The offset height.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// resize floating objects with invoking command
spread.commandManager().execute({cmd: "resizeFloatingObjects", sheetName: "Sheet1", floatingObjects: ["floatingObject1", "floatingObject2"], offsetWidth: 100, offsetHeight: 100});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `floatingObjects`: `string`[] ; `offsetHeight`: `number` ; `offsetWidth`: `number` ; `offsetX`: `number` ; `offsetY`: `number` ; `sheetName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="resizerow" name="resizerow"></a> resizeRow

• **resizeRow**: `Object`

Represents the command used to resize the row on a worksheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The resize rows; each item is an object which has firstRow and lastRow.

**`param`** The size of the row that is being resized.

**`param`** Whether the row being resized is in the column header area.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// resize the row with invoking command
spread.commandManager().execute({cmd: "resizeRow", sheetName: "Sheet1", rows: [{firstRow: 1, lastRow: 5}], size: 100, rowHeader: false});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `columnHeader`: `boolean` ; `rows`: `Object`[] ; `sheetName`: `string` ; `size`: `number`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="selectnextcontrol" name="selectnextcontrol"></a> selectNextControl

• **selectNextControl**: `Object`

Represents the command used to select the next control.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example maps the selectNextControl action to the Tab key.
spread.commandManager().setShortcutKey('selectNextControl', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
spread.commandManager().setShortcutKey('selectPreviousControl', GC.Spread.Commands.Key.tab, false, true, false, false); // Shift key and Tab key
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="selectpreviouscontrol" name="selectpreviouscontrol"></a> selectPreviousControl

• **selectPreviousControl**: `Object`

Represents the command used to select the previous control.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example maps the selectPreviousControl action to the Shift + Tab key combination.
spread.commandManager().setShortcutKey('selectNextControl', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
spread.commandManager().setShortcutKey('selectPreviousControl', GC.Spread.Commands.Key.tab, false, true, false, false); // Shift key and Tab key
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="selectionbottom" name="selectionbottom"></a> selectionBottom

• **selectionBottom**: `Object`

Represents the command used to extend the selection to the last row.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the selectionBottom action.
spread.commandManager().setShortcutKey('selectionBottom', GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="selectiondown" name="selectiondown"></a> selectionDown

• **selectionDown**: `Object`

Represents the command used to extend the selection down one row.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the selectionDown action.
spread.commandManager().setShortcutKey('selectionDown', GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="selectionend" name="selectionend"></a> selectionEnd

• **selectionEnd**: `Object`

Represents the command used to extend the selection to the last column.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the selectionEnd action.
spread.focus();
spread.commandManager().setShortcutKey('selectionEnd', GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="selectionfirst" name="selectionfirst"></a> selectionFirst

• **selectionFirst**: `Object`

Represents the command used to extend the selection to the first cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the selectionFirst action.
spread.focus();
spread.commandManager().setShortcutKey('selectionFirst', GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="selectionhome" name="selectionhome"></a> selectionHome

• **selectionHome**: `Object`

Represents the command used to extend the selection to the first column.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the selectionHome action.
spread.focus();
spread.commandManager().setShortcutKey('selectionHome', GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="selectionlast" name="selectionlast"></a> selectionLast

• **selectionLast**: `Object`

Represents the command used to extend the selection to the last cell.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the selectionLast action.
spread.focus();
spread.commandManager().setShortcutKey('selectionLast', GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="selectionleft" name="selectionleft"></a> selectionLeft

• **selectionLeft**: `Object`

Represents the command used to extend the selection one column to the left.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the selectionLeft action.
spread.commandManager().setShortcutKey('selectionLeft', GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="selectionpagedown" name="selectionpagedown"></a> selectionPageDown

• **selectionPageDown**: `Object`

Represents the command used to extend the selection down to include one page of rows.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the selectionPageDown action.
spread.commandManager().setShortcutKey('selectionPageDown', GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="selectionpageup" name="selectionpageup"></a> selectionPageUp

• **selectionPageUp**: `Object`

Represents the command used to extend the selection up to include one page of rows.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the selectionPageUp action.
spread.commandManager().setShortcutKey('selectionPageUp', GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="selectionright" name="selectionright"></a> selectionRight

• **selectionRight**: `Object`

Represents the command used to extend the selection one column to the right.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the selectionRight action.
spread.commandManager().setShortcutKey("selectionRight", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="selectiontop" name="selectiontop"></a> selectionTop

• **selectionTop**: `Object`

Represents the command used to extend the selection to the first row.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the selectionTop action.
spread.commandManager().setShortcutKey("selectionTop", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="selectionup" name="selectionup"></a> selectionUp

• **selectionUp**: `Object`

Represents the command used to extend the selection up one row.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the selectionUp action.
spread.commandManager().setShortcutKey("selectionUp", GC.Spread.Commands.Key.a, false, false, false, false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="splitresizecolumn" name="splitresizecolumn"></a> splitResizeColumn

• **splitResizeColumn**: `Object`

Represents the command used to split resize the column on a worksheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The resize columns; each item is an object which has firstCol and lastCol.

**`param`** The size of the column that is being resized.

**`param`** Whether the column being resized is in the row header area.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// split resize the column with invoking command
spread.commandManager().execute({cmd: "splitResizeColumn", sheetName: "Sheet1", columns: [{firstCol: 1, lastCol: 2}]}, size: 100, rowHeader: false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `columns`: `Object`[] ; `rowHeader`: `boolean` ; `sheetName`: `string` ; `size`: `number`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="splitresizerow" name="splitresizerow"></a> splitResizeRow

• **splitResizeRow**: `Object`

Represents the command used to split resize the row on a worksheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The resize rows; each item is an object which has firstRow and lastRow.

**`param`** The size of the row that is being resized.

**`param`** Whether the row being resized is in the column header area.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// split resize the row with invoking command
spread.commandManager().execute({cmd: "splitResizeRow", sheetName: "Sheet1", rows: [{firstRow: 1, lastRow: 2}]}, size: 100, columnHeader: false);
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `columnHeader`: `boolean` ; `rows`: `Object`[] ; `sheetName`: `string` ; `size`: `number`  }, `isUndo`: `boolean`) => `any` |

___

### <a id="tabledeletecolumns" name="tabledeletecolumns"></a> tableDeleteColumns

• **tableDeleteColumns**: `Object`

Represents the command used to delete columns for table.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The table name.

**`param`** The index of the starting column to delete, the col index is based on table index.

**`param`** The number of columns to delete.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// delete columns for table with invoking command
spread.commandManager().execute({cmd: "tableDeleteColumns", sheetName: "Sheet1", tableName: "table1", col: 1, count: 3});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col`: `number` ; `count`: `number` ; `sheetName`: `string` ; `tableName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="tabledeleterows" name="tabledeleterows"></a> tableDeleteRows

• **tableDeleteRows**: `Object`

Represents the command used to delete rows for table.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The table name.

**`param`** The index of the starting row to delete, the row index is based on table index.

**`param`** The number of rows to delete.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// delete rows for table with invoking command
spread.commandManager().execute({cmd: "tableDeleteRows", sheetName: "Sheet1", tableName: "table1", row: 1, count: 3});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `count`: `number` ; `row`: `number` ; `sheetName`: `string` ; `tableName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="tableinsertcolumns" name="tableinsertcolumns"></a> tableInsertColumns

• **tableInsertColumns**: `Object`

Represents the command used to insert columns for table.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The table name.

**`param`** The index of the starting column to insert, the col index is based on table index.

**`param`** The number of columns to insert.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// insert columns for table with invoking command
spread.commandManager().execute({cmd: "tableInsertColumns", sheetName: "Sheet1", tableName: "table1", col: 1, count: 3});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `col`: `number` ; `count`: `number` ; `sheetName`: `string` ; `tableName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="tableinsertrows" name="tableinsertrows"></a> tableInsertRows

• **tableInsertRows**: `Object`

Represents the command used to insert rows for table.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The table name.

**`param`** The index of the starting row to insert, the row index is based on table index.

**`param`** The number of rows to insert.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// insert rows for table with invoking command
spread.commandManager().execute({cmd: "tableInsertRows", sheetName: "Sheet1", tableName: "table1", row: 1, count: 3});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `count`: `number` ; `row`: `number` ; `sheetName`: `string` ; `tableName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="tableresize" name="tableresize"></a> tableResize

• **tableResize**: `Object`

Represents the command used to resize table.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The table name.

**`param`** The resized table range.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// resize table with invoking command
spread.commandManager().execute({cmd: "tableResize", sheetName: "Sheet1", tableName: "table1", resizeToRange: new GC.Spread.Sheets.Range(1, 1, 5, 3)});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `resizeToRange`: [`Range`](../classes/GC.Spread.Sheets.Range) ; `sheetName`: `string` ; `tableName`: `string`  }, `isUndo`: `boolean`) => `boolean` |

___

### <a id="undo" name="undo"></a> undo

• **undo**: `Object`

Represents the command used to perform an undo of the most recent edit or action.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
//This example uses the undo command.
spread.commandManager().execute({cmd: "undo", sheetName: "Sheet1"});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string`  }) => `any` |

___

### <a id="zoom" name="zoom"></a> zoom

• **zoom**: `Object`

Represents the command used to zoom the sheet.

**`property`** {boolean} canUndo - indicates whether the command supports undo and redo operations.

**`property`** {function} execute - performs an execute or undo operation.
The arguments of the execute method are as follows.

**`param`** The context of the operation.

**`param`** The options of the operation.

**`param`** The sheet name.

**`param`** The zoom factor.

**`param`** `true` if this is an undo operation; otherwise, `false`.

**`example`**
```
// zoom the sheet with invoking command
spread.commandManager().execute({cmd: "zoom", sheetName: "Sheet1", zoomFactor: 3});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `canUndo` | `boolean` |
| `execute` | (`context`: [`Workbook`](../classes/GC.Spread.Sheets.Workbook), `options`: { `sheetName`: `string` ; `zoomFactor`: `number`  }, `isUndo`: `boolean`) => `any` |

## Functions

### <a id="endtransaction" name="endtransaction"></a> endTransaction

▸ **endTransaction**(`context`, `options`): `void`

Ends a transaction. During the transaction, the changes of the data model will be saved.

**`example`**
```
//For example, the following code registers the changeBackColor command and then executes the command.
var command = {
  canUndo: true,
  execute: function (context, options, isUndo) {
    var Commands = GC.Spread.Sheets.Commands;
    options.cmd = "changeBackColor";
    if (isUndo) {
      Commands.undoTransaction(context, options);
      return true;
    } else {
      Commands.startTransaction(context, options);
      var sheet = context.getSheetFromName(options.sheetName);
      var cell = sheet.getCell(options.row, options.col);
      cell.backColor(options.backColor);
      Commands.endTransaction(context, options);
      return true;
    }
  }
};
var spread = GC.Spread.Sheets.findControl(document.getElementById("ss"));
var commandManager = spread.commandManager();
commandManager.register("changeBackColor", command);
commandManager.execute({cmd: "changeBackColor", sheetName: spread.getSheet(0).name(), row: 1, col: 2, backColor: "red"});
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `context` | [`Workbook`](../classes/GC.Spread.Sheets.Workbook) | The context of the operation. |
| `options` | `any` | The options of the operation. |

#### Returns

`void`

___

### <a id="starttransaction" name="starttransaction"></a> startTransaction

▸ **startTransaction**(`context`, `options`): `void`

Starts a transaction. During the transaction, the changes of the data model will be saved.

**`example`**
```
//For example, the following code registers the changeBackColor command and then executes the command.
var command = {
  canUndo: true,
  execute: function (context, options, isUndo) {
    var Commands = GC.Spread.Sheets.Commands;
    options.cmd = "changeBackColor";
    if (isUndo) {
      Commands.undoTransaction(context, options);
      return true;
    } else {
      Commands.startTransaction(context, options);
      var sheet = context.getSheetFromName(options.sheetName);
      var cell = sheet.getCell(options.row, options.col);
      cell.backColor(options.backColor);
      Commands.endTransaction(context, options);
      return true;
    }
  }
};
var spread = GC.Spread.Sheets.findControl(document.getElementById("ss"));
var commandManager = spread.commandManager();
commandManager.register("changeBackColor", command);
commandManager.execute({cmd: "changeBackColor", sheetName: spread.getSheet(0).name(), row: 1, col: 2, backColor: "red"});
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `context` | [`Workbook`](../classes/GC.Spread.Sheets.Workbook) | The context of the operation. |
| `options` | `any` | The options of the operation. |

#### Returns

`void`

___

### <a id="undotransaction" name="undotransaction"></a> undoTransaction

▸ **undoTransaction**(`context`, `options`): `void`

Undo the changes made in a transaction.

**`example`**
```
//For example, the following code registers the changeBackColor command and then executes the command.
var command = {
  canUndo: true,
  execute: function (context, options, isUndo) {
    var Commands = GC.Spread.Sheets.Commands;
    options.cmd = "changeBackColor";
    if (isUndo) {
      Commands.undoTransaction(context, options);
      return true;
    } else {
      Commands.startTransaction(context, options);
      var sheet = context.getSheetFromName(options.sheetName);
      var cell = sheet.getCell(options.row, options.col);
      cell.backColor(options.backColor);
      Commands.endTransaction(context, options);
      return true;
    }
  }
};
var spread = GC.Spread.Sheets.findControl(document.getElementById("ss"));
var commandManager = spread.commandManager();
commandManager.register("changeBackColor", command);
commandManager.execute({cmd: "changeBackColor", sheetName: spread.getSheet(0).name(), row: 1, col: 2, backColor: "red"});
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `context` | [`Workbook`](../classes/GC.Spread.Sheets.Workbook) | The context of the operation. |
| `options` | `any` | The options of the operation. |

#### Returns

`void`
