Package com.github.tonyluo.excel.util
Class CellConstraint
java.lang.Object
com.github.tonyluo.excel.util.CellConstraint
public abstract class CellConstraint
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description CellConstraint()
-
Method Summary
Modifier and Type Method Description void
addValidationData(org.apache.poi.xssf.usermodel.XSSFSheet sheet, int firstRow, int lastRow, int firstCol, int lastCol, org.apache.poi.xssf.usermodel.XSSFDataValidationHelper dvHelper, org.apache.poi.ss.usermodel.DataValidationConstraint dvConstraint)
abstract org.apache.poi.ss.usermodel.DataValidationConstraint
createConstraint(org.apache.poi.xssf.usermodel.XSSFSheet sheet, int firstRow, int lastRow, int firstCol, int lastCol)
java.lang.Object
getAndFormatCellValue(java.lang.Object valueObject)
abstract java.util.Map
getExplicitListValues()
static CellConstraint
getInstance(java.lang.String constraintClass)
boolean
setAndFormatCellValue(org.apache.poi.ss.usermodel.Cell cell, java.lang.Object valueObject)
-
Constructor Details
-
CellConstraint
public CellConstraint()
-
-
Method Details
-
createConstraint
public abstract org.apache.poi.ss.usermodel.DataValidationConstraint createConstraint(org.apache.poi.xssf.usermodel.XSSFSheet sheet, int firstRow, int lastRow, int firstCol, int lastCol) -
getExplicitListValues
public abstract java.util.Map getExplicitListValues() -
setAndFormatCellValue
public boolean setAndFormatCellValue(org.apache.poi.ss.usermodel.Cell cell, java.lang.Object valueObject) -
getAndFormatCellValue
public java.lang.Object getAndFormatCellValue(java.lang.Object valueObject) -
getInstance
public static CellConstraint getInstance(java.lang.String constraintClass) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException- Throws:
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
-
addValidationData
public void addValidationData(org.apache.poi.xssf.usermodel.XSSFSheet sheet, int firstRow, int lastRow, int firstCol, int lastCol, org.apache.poi.xssf.usermodel.XSSFDataValidationHelper dvHelper, org.apache.poi.ss.usermodel.DataValidationConstraint dvConstraint)
-