Class TableImpl

    • Method Detail

      • getTotalsRowCount

        public int getTotalsRowCount()
        Specified by:
        getTotalsRowCount in interface STable
        Specified by:
        getTotalsRowCount in interface Table
        Returns:
        0 for no totals rows, 1 for totals row shown. Values > 1 are not currently used by Excel up through 2016, and the OOXML spec doesn't define how they would be implemented.
      • getHeaderRowCount

        public int getHeaderRowCount()
        Specified by:
        getHeaderRowCount in interface STable
        Specified by:
        getHeaderRowCount in interface Table
        Returns:
        0 for no header rows, 1 for table headers shown. Values > 1 might be used by Excel for pivot tables?
      • setTotalsRowCount

        public void setTotalsRowCount​(int count)
        Specified by:
        setTotalsRowCount in interface STable
      • setHeaderRowCount

        public void setHeaderRowCount​(int count)
        Specified by:
        setHeaderRowCount in interface STable
      • setName

        public void setName​(String newname)
        Specified by:
        setName in interface STable
      • destroy

        public void destroy()
        Description copied from interface: LinkedModelObject
        Destroy / release this model object, for example all the dependency, parent linking. this method has to be called before remove this linking from parent object
        Specified by:
        destroy in interface LinkedModelObject
      • insertCols

        public void insertCols​(int col1,
                               int col2,
                               boolean insertLeft)
        Specified by:
        insertCols in class AbstractTableAdv
      • enableAutoFilter

        public void enableAutoFilter​(boolean enable)
        Specified by:
        enableAutoFilter in interface STable
      • getAutoFilter

        public SAutoFilter getAutoFilter()
        Description copied from interface: STable
        Gets the auto filter information if there is.
        Specified by:
        getAutoFilter in interface STable
        Returns:
        the auto filter, or null if not found
      • createAutoFilter

        public SAutoFilter createAutoFilter()
        Description copied from interface: STable
        Creates a new auto filter for this table the old one will be drop directly.
        Specified by:
        createAutoFilter in interface STable
        Returns:
        the new auto filter.
      • deleteAutoFilter

        public void deleteAutoFilter()
        Description copied from interface: STable
        Delete current autofilter if it has
        Specified by:
        deleteAutoFilter in interface STable
      • contains

        public boolean contains​(CellReference cell)
        Description copied from interface: Table
        checks if the given cell is part of the table. Includes checking that they are on the same sheet.
        Specified by:
        contains in interface Table
        Parameters:
        cell - reference to a possibly undefined cell location
        Returns:
        true if the table and cell are on the same sheet and the cell is within the table range.
      • getStartColIndex

        public int getStartColIndex()
        Description copied from interface: Table
        Get the top-left column index relative to the sheet
        Specified by:
        getStartColIndex in interface Table
        Returns:
        table start column index on sheet
      • getStartRowIndex

        public int getStartRowIndex()
        Description copied from interface: Table
        Get the top-left row index on the sheet
        Specified by:
        getStartRowIndex in interface Table
        Returns:
        table start row index on sheet
      • getEndColIndex

        public int getEndColIndex()
        Description copied from interface: Table
        Get the bottom-right column index on the sheet
        Specified by:
        getEndColIndex in interface Table
        Returns:
        table end column index on sheet
      • getEndRowIndex

        public int getEndRowIndex()
        Description copied from interface: Table
        Get the bottom-right row index
        Specified by:
        getEndRowIndex in interface Table
        Returns:
        table end row index on sheet
      • getName

        public String getName()
        Description copied from interface: Table
        Get the name of the table.
        Specified by:
        getName in interface STable
        Specified by:
        getName in interface Table
        Returns:
        table name
      • getStyleName

        public String getStyleName()
        Specified by:
        getStyleName in interface Table
        Returns:
        name of the table style, if there is one. May be a built-in name or user-defined.
      • findColumnIndex

        public int findColumnIndex​(String columnHeader)
        Description copied from interface: Table
        Returns the index of a given named column in the table (names are case insensitive in XSSF). Note this list is lazily loaded and cached for performance. Changes to the underlying table structure are not reflected in later calls unless XSSFTable.updateHeaders() is called to reset the cache.
        Specified by:
        findColumnIndex in interface Table
        Parameters:
        columnHeader - the column header name to get the table column index of
        Returns:
        column index corresponding to columnHeader
      • getSheetName

        public String getSheetName()
        Description copied from interface: Table
        Returns the sheet name that the table belongs to.
        Specified by:
        getSheetName in interface Table
        Returns:
        sheet name
      • isHasTotalsRow

        public boolean isHasTotalsRow()
        Description copied from interface: Table
        Note: This is misleading. The OOXML spec indicates this is true if the totals row has ever been shown, not whether or not it is currently displayed. Use Table.getTotalsRowCount() > 0 to decide whether or not the totals row is visible.
        Specified by:
        isHasTotalsRow in interface Table
        Returns:
        true if a totals row has ever been shown for this table
        See Also:
        Table.getTotalsRowCount()