new CellRange(cellRange)
Parameters:
| Name |
Type |
Description |
cellRange |
string
|
Object
|
The cell range definition. The constructor accepts either a string in A1 notation (e.g. 'A1:B5') or an object specifying the first and last row/column indices.
Properties
| Name |
Type |
Description |
firstRow |
number
|
The first row index of the cell range. |
lastRow |
number
|
The last row index of the cell range. |
firstColumn |
number
|
The first column index of the cell range. |
lastColumn |
number
|
The last column index of the cell range. |
|
Properties:
| Name |
Type |
Description |
firstRow |
number
|
The first row in a specified range of cells within a sheet that identifies the vertical starting boundary in a spreadsheet. |
lastRow |
number
|
The index of the last row in a specified range of cells within a sheet. |
firstColumn |
number
|
The first column in a specified range of cells within a sheet that identifies the starting boundary of a cell range along the horizontal axis of a spreadsheet. |
lastColumn |
number
|
The index of the last column in a specified range of cells within a sheet. |
rangeDisplayValue |
string
|
The display value of the cell range in the format "A1:B2". |
Example
WebViewer.Iframe(...)
.then(instance => {
const { documentViewer, SpreadsheetEditor } = instance.Core;
const SpreadsheetEditorEvents = SpreadsheetEditor.SpreadsheetEditorManager.Events;
const spreadsheetEditorManager = documentViewer.getSpreadsheetEditorManager();
spreadsheetEditorManager.addEventListener(SpreadsheetEditorEvents.SPREADSHEET_EDITOR_READY, async () => {
const cellRange = new SpreadsheetEditor.CellRange('A1:B5');
const cellRange2 = new SpreadsheetEditor.CellRange({
firstRow: 0,
firstColumn: 0,
lastRow: 4,
lastColumn: 1
});
});
});