Class ExcelCell
java.lang.Object
io.github.mbenincasa.javaexcelutils.model.excel.ExcelCell
ExcelCell
is the Cell
wrapper class of the Apache POI library- Since:
- 0.3.0
- Author:
- Mirko Benincasa
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
formatStyle
(short dataFormat) Format text according to the pattern providedvoid
formatStyle
(String dataFormat) Format the cell according to the chosen formatReturns the cell namegetRow()
Returns the Row to which it belongsstatic ExcelCell
of
(org.apache.poi.ss.usermodel.Cell cell) Get to an ExcelCell instance from Apache POI CellRead the value written inside the CellRead the value written inside the CellRead the value written inside the Cell as Stringvoid
remove()
Remove the selected Cellvoid
writeValue
(Object val) Writes inside the cell
-
Constructor Details
-
ExcelCell
public ExcelCell()
-
-
Method Details
-
of
Get to an ExcelCell instance from Apache POI Cell- Parameters:
cell
- The Cell instance to wrap- Returns:
- The ExcelCell instance
- Since:
- 0.5.0
-
remove
Remove the selected Cell- Throws:
CellNotFoundException
- If the cell is not present or has not been created- Since:
- 0.4.1
-
getRow
Returns the Row to which it belongs- Returns:
- A ExcelRow
-
readValue
Read the value written inside the Cell- Returns:
- The value written in the Cell
- Throws:
ReadValueException
- If an error occurs while reading- Since:
- 0.4.0
-
readValue
Read the value written inside the Cell- Parameters:
type
- The class type of the object written to the Cell- Returns:
- The value written in the Cell
- Throws:
ReadValueException
- If an error occurs while reading
-
readValueAsString
Read the value written inside the Cell as String- Returns:
- The value written in the Cell
- Since:
- 0.4.0
-
writeValue
Writes inside the cell- Parameters:
val
- The value to write in the Cell
-
getCellName
Returns the cell name- Returns:
- cell name
- Since:
- 0.4.2
-
formatStyle
public void formatStyle(short dataFormat) Format text according to the pattern provided- Parameters:
dataFormat
- The Apache POI library CellStyle dataFormat
-
formatStyle
Format the cell according to the chosen format- Parameters:
dataFormat
- The string that defines the data format- Since:
- 0.5.0
-