Sets the selected cell on an Excel spreadsheet and defines cursor behavior when reading from and writing to the spreadsheet.
0 |
Integer |
Workbook Handle |
The handle for the workbook returned from the Open Workbook File command. |
1 |
Workbook Address Mode Type |
Addressing Mode |
Indicates how you would like to indicate the new selected cell (see Remarks). |
2 |
String |
Absolute Position Worksheet Name |
The name of the worksheet you would like to be active (applies to “Absolute Position” addressing mode only). |
3 |
String |
Absolute Position Column (A, B, C, ...) |
The column containing the cell you would like to select (applies to “Absolute Position” addressing mode only). |
4 |
Integer |
Absolute Position Row (1, 2, 3, ...) |
The row containing the cell you would like to select (applies to “Absolute Position” addressing mode only). |
5 |
Move Direction Type |
Relative Move Direction |
The direction in which to move the cell cursor (relative to the currently-selected cell). Applies to the “Relative Move” addressing mode only. |
6 |
Integer |
Relative Move # Cells |
The number of cells to move in the relative move direction, relative to the currently-selected cell). Applies to the “Relative Move” addressing mode only. |
7 |
String |
Named Cell/Range in Work- book |
The name of a cell or range in a workbook to move to (applies to “Named Cell/Range in Work- book” addressing mode only). |
8 |
Write Mode Type |
Write Mode |
Indicate whether you would like to insert new cells when writing, or overwrite the cell’s contents (see Remarks). |
9 |
Move Direction Type |
Auto Move Direction |
The direction that the cell cursor should automati- cally move after a cell is read or written to. |
10 |
Integer |
Auto Move # Cells |
The number of cells the cursor should automati- cally move by after a cell is read or written to. |
None.
SUCCESS |
The cell was selected successfully. |
FAILURE |
The workbook handle was invalid, or the named cell/range was not found. |
There are four addressing modes:
No Position Change allows you to change settings (such as Auto Move Direction) without changing the active cell selection.
Absolute Position allows you to specify a specific cell to select (for example, Sheet 1, cell C5).
Relative Move allows you to move the “cell cursor” relative to the currently selected cell (for example, move 5 columns to the right of the currently selected cell).
Named Cell/Range in Workbook allows you to move directly to a named cell or range in a workbook. If a worksheet name is specified that does not already exist, a new worksheet with that name will be created.
Insert write mode shifts the current cell (and those below it) downward in order to add the data. Overwrite mode
replaces the cell’s existing contents.
Anytime data is read from a cell or written to a cell, an “auto move” (see argument 9) takes place. Therefore, after reading or writing to cell C8, the selected cell will be C9 (assuming the Move Direction Type is Down and the Auto Move # Cells argument is 1).