Class ExcelCell


  • public class ExcelCell
    extends java.lang.Object
    • Method Summary

      Modifier and Type Method Description
      java.util.Date getDateValue​(java.util.Date defaultValue)  
      double getDoubleValue()  
      double getDoubleValue​(double defaultValue)  
      float getFloatValue()  
      float getFloatValue​(float defaultValue)  
      java.lang.String getIntegerStringValue​(long defaultValue)  
      int getIntValue()  
      int getIntValue​(int defaultValue)  
      long getLongValue()  
      long getLongValue​(long defaultValue)  
      ExcelCell getNextCell()  
      ExcelCell getNextRowCell()  
      org.apache.poi.ss.usermodel.Cell getPoiCell​(boolean force)  
      java.lang.String getStringValue()  
      java.lang.String getStringValue​(java.lang.String defaultValue)  
      boolean isEmpty()  
      ExcelCell set​(java.lang.Object val)  
      static int toCellIndex​(java.lang.String cellColumnName)
      to cell index
      static java.lang.String toColumnName​(int rowIndex, int cellIndex)
      to column name
      static java.lang.String toColumnNameByCellIndex​(int cellIndex)  
      static java.util.Date toDate​(org.apache.poi.ss.usermodel.Cell cell, java.util.Date defaultValue)
      toDate by cell
      static double toDouble​(org.apache.poi.ss.usermodel.Cell cell)
      toDouble by cell
      static double toDouble​(org.apache.poi.ss.usermodel.Cell cell, double defaultValue)
      toDouble by cell
      static int[] toRowCellIndex​(java.lang.String columnName)
      to row cell index
      static java.lang.String toString​(org.apache.poi.ss.usermodel.Cell cell, java.lang.String defaultValue)
      toString by cell
      • Methods inherited from class java.lang.Object

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

      • getPoiCell

        public org.apache.poi.ss.usermodel.Cell getPoiCell​(boolean force)
      • isEmpty

        public boolean isEmpty()
      • getNextCell

        public ExcelCell getNextCell()
      • getNextRowCell

        public ExcelCell getNextRowCell()
      • set

        public ExcelCell set​(java.lang.Object val)
      • getIntValue

        public int getIntValue​(int defaultValue)
      • getLongValue

        public long getLongValue​(long defaultValue)
      • getFloatValue

        public float getFloatValue​(float defaultValue)
      • getDoubleValue

        public double getDoubleValue​(double defaultValue)
      • getIntValue

        public int getIntValue()
      • getLongValue

        public long getLongValue()
      • getFloatValue

        public float getFloatValue()
      • getDoubleValue

        public double getDoubleValue()
      • getDateValue

        public java.util.Date getDateValue​(java.util.Date defaultValue)
      • getIntegerStringValue

        public java.lang.String getIntegerStringValue​(long defaultValue)
      • getStringValue

        public java.lang.String getStringValue​(java.lang.String defaultValue)
      • getStringValue

        public java.lang.String getStringValue()
      • toDouble

        public static double toDouble​(org.apache.poi.ss.usermodel.Cell cell,
                                      double defaultValue)
        toDouble by cell
        Parameters:
        cell -
        defaultValue -
        Returns:
      • toDouble

        public static double toDouble​(org.apache.poi.ss.usermodel.Cell cell)
        toDouble by cell
        Parameters:
        cell -
        defaultValue -
        Returns:
      • toDate

        public static java.util.Date toDate​(org.apache.poi.ss.usermodel.Cell cell,
                                            java.util.Date defaultValue)
        toDate by cell
        Parameters:
        cell -
        defaultValue -
        Returns:
      • toString

        public static java.lang.String toString​(org.apache.poi.ss.usermodel.Cell cell,
                                                java.lang.String defaultValue)
        toString by cell
        Parameters:
        cell -
        defaultValue -
        Returns:
        BOOLEAN [1, 0]
        FORMULA -> String
        NUMERIC -> Double.toString
        STRING -> String
        ETC -> defaultValue
      • toColumnNameByCellIndex

        public static java.lang.String toColumnNameByCellIndex​(int cellIndex)
      • toColumnName

        public static java.lang.String toColumnName​(int rowIndex,
                                                    int cellIndex)
        to column name
        Parameters:
        rowIndex -
        cellIndex -
        Returns:
      • toCellIndex

        public static int toCellIndex​(java.lang.String cellColumnName)
        to cell index
        Parameters:
        cellColumnName -
        Returns:
      • toRowCellIndex

        public static int[] toRowCellIndex​(java.lang.String columnName)
        to row cell index
        Parameters:
        columnName -
        Returns:
        int[]{rowIndex, cellIndex}