Class Column


  • public class Column
    extends java.lang.Object
    Class representing a column of a worksheet
    • Constructor Summary

      Constructors 
      Constructor Description
      Column()
      Default constructor
      Column​(int number)
      Constructor with column number
      Column​(java.lang.String columnAddress)
      Constructor with column address
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getColumnAddress()
      Gets the column address
      int getNumber()
      Gets the column number
      float getWidth()
      Gets the width of the column
      boolean hasAutoFilter()
      Gets whether auto filter is enabled on the column
      boolean isHidden()
      Gets whether the column is hidden or visible
      void setAutoFilter​(boolean hasAutoFilter)
      Sets whether auto filter is enabled on the column
      void setColumnAddress​(java.lang.String columnAddress)
      Sets the column address
      void setHidden​(boolean isHidden)
      Sets whether the column is hidden or visible
      void setNumber​(int number)
      Sets the column number
      void setWidth​(float width)
      Sets the width of the column
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Column

        public Column()
        Default constructor
      • Column

        public Column​(java.lang.String columnAddress)
        Constructor with column address
        Parameters:
        columnAddress - Column address (A to XFD)
      • Column

        public Column​(int number)
        Constructor with column number
        Parameters:
        number - Column number (zero-based, 0 to 16383)
    • Method Detail

      • setAutoFilter

        public void setAutoFilter​(boolean hasAutoFilter)
        Sets whether auto filter is enabled on the column
        Parameters:
        hasAutoFilter - If true, the column has auto filter applied, otherwise not
      • getColumnAddress

        public java.lang.String getColumnAddress()
        Gets the column address
        Returns:
        Column address (A to XFD)
      • setColumnAddress

        public void setColumnAddress​(java.lang.String columnAddress)
        Sets the column address
        Parameters:
        columnAddress - Column address (A to XFD)
      • getNumber

        public int getNumber()
        Gets the column number
        Returns:
        Column number (0 to 16383)
      • setNumber

        public void setNumber​(int number)
        Sets the column number
        Parameters:
        number - Column number (0 to 16383)
      • getWidth

        public float getWidth()
        Gets the width of the column
        Returns:
        Width of the column
      • setWidth

        public void setWidth​(float width)
        Sets the width of the column
        Parameters:
        width - Width of the column
      • hasAutoFilter

        public boolean hasAutoFilter()
        Gets whether auto filter is enabled on the column
        Returns:
        If true, the column has auto filter applied, otherwise not
      • isHidden

        public boolean isHidden()
        Gets whether the column is hidden or visible
        Returns:
        If true, the column is hidden, otherwise visible
      • setHidden

        public void setHidden​(boolean isHidden)
        Sets whether the column is hidden or visible
        Parameters:
        isHidden - If true, the column is hidden, otherwise visible