Class SpreadsheetCommand

    • Field Detail

      • activeSheetIndex

        protected int activeSheetIndex
    • Constructor Detail

      • SpreadsheetCommand

        public SpreadsheetCommand​(Spreadsheet spreadsheet)
        Creates a new command targeting the given spreadsheet.
        Parameters:
        spreadsheet - The target spreadsheet
    • Method Detail

      • getSheet

        protected org.apache.poi.ss.usermodel.Sheet getSheet()
        Returns the currently active sheet.
        Returns:
        active sheet
      • getActiveSheetIndex

        public int getActiveSheetIndex()
        Description copied from interface: Command
        Returns the index of the currently active sheet.
        Specified by:
        getActiveSheetIndex in interface Command
        Returns:
        index of active sheet
      • setActiveSheetIndex

        public void setActiveSheetIndex​(int activeSheetIndex)
        Description copied from interface: Command
        Sets the sheet at the given index the currently active sheet.
        Specified by:
        setActiveSheetIndex in interface Command
        Parameters:
        activeSheetIndex - Index of sheet to set active