Angular Spreadsheet Activation

    The IgxSpreadsheetComponent control exposes properties that allow you to determine the currently active cell, pane, and worksheet in the control. This is helpful as it can help you to determine where the user may be navigating or editing in the control.

    Demo

    Activation Overview

    The activation of the IgxSpreadsheetComponent control is split up between the cells, panes, and worksheets of the current workbook of the spreadsheet. The three "active" properties are described below:

    • activeCell: Returns or sets the active cell in the spreadsheet. To set it, you must create a new instance of SpreadsheetCell and pass in information about that cell, such as the column and row or the string address of the cell.
    • activePane: Returns the active pane in the currently active worksheet of the spreadsheet control.
    • activeWorksheet: Returns or sets the active worksheet in the workbook of the spreadsheet control. This can be set by setting it to an existing worksheet in the workbook attached to the spreadsheet.

    The following code snippet shows setting activation of the cell and worksheet in the IgxSpreadsheetComponent control:

    this.spreadsheet.activeWorksheet = this.spreadsheet.workbook.worksheets(1);
    
    this.spreadsheet.activeCell = new SpreadsheetCell("C5");