Class ExcelReadUtil

java.lang.Object
jp.ecuacion.util.poi.excel.util.ExcelReadUtil

public class ExcelReadUtil extends Object
Provides excel-related apache POI utility methods.
  • Constructor Details

    • ExcelReadUtil

      public ExcelReadUtil()
      Constructs a new instance with NoDataString = NULL.

      NoDataString = NULL is recommended. See NoDataString.

    • ExcelReadUtil

      public ExcelReadUtil(@Nonnull NoDataString noDataString)
      Constructs a new instance with designated NoDataString.

      NoDataString = NULL is recommended. See NoDataString.

      Parameters:
      noDataString - noDataString
  • Method Details

    • getNoDataStringIfNoData

      @Nullable public String getNoDataStringIfNoData(@Nullable String value)
      Returns proper NoDataString value if the argument value is null or "", otherwize returns the argument value.
      Parameters:
      value - value, may be null.
      Returns:
      the argument value or the empty string designated by noDataString when the argument value is empty.
    • getStringFromCell

      @Nullable public String getStringFromCell(@Nullable org.apache.poi.ss.usermodel.Cell cell)
      Returns String format cell value in spite of the format or value kind of the cell.
      Parameters:
      cell - the cell of the excel file
      Returns:
      the string which expresses the value of the cell.