Package org.openxava.util.jxls
Class JxlsCell
java.lang.Object
org.openxava.util.jxls.JxlsCell
JxlsCell: a class to wrap and simplify the use of Apache POI Cell in the context of OpenXava
Usage:
JxlsWorkbook wb = new JxlsWorkbook("Test");
JxlsSheet sheet = wb.addSheet("Test");
JxlsCell cell = sheet.setValue(4, 4, 2);
cell.setSpan(2, 1).setHyperLink("http://www.openxava.org");
sheet.setValue(4, 5, "Test").setSpan(3, 1);
- Author:
- Laurent Wibaux
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedprotectedprotected -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreatePOICell(JxlsWorkbook workbook, org.apache.poi.ss.usermodel.Sheet sheet, Map<Integer, JxlsStyle> columnStyles) Gets the hyperlink associated with this celldoubleGet the numeric value of the cellGet the value of the cell as textgetStyle()getValue()Get the object value contained in the cellstatic StringgetXlsReference(int column, int row) setHyperlink(String hyperlink) Sets the hyperlink associated with this cellsetSpan(int columnSpan, int rowSpan) Sets the span of the cellSets the style of the cell
-
Field Details
-
row
protected int row -
column
protected int column
-
-
Constructor Details
-
JxlsCell
-
JxlsCell
-
JxlsCell
-
JxlsCell
-
-
Method Details
-
getXlsReference
-
getValue
Get the object value contained in the cell- Returns:
- the value
-
getNumericValue
public double getNumericValue()Get the numeric value of the cell- Returns:
- the value whenever possible and 0 if the value is some text
-
getStringValue
Get the value of the cell as text- Returns:
- the value as a text
-
setSpan
Sets the span of the cell- Parameters:
columnSpan- the number of columns to occupyrowSpan- the number of rows to occupy- Returns:
- the cell to chain other settings
-
setHyperlink
Sets the hyperlink associated with this cell- Parameters:
hyperlink- a url associated with the cell content- Returns:
- the cell to chain other settings
-
getHyperlink
Gets the hyperlink associated with this cell- Returns:
- the url
-
setStyle
Sets the style of the cell- Parameters:
style- the style to render the cell content- Returns:
- the cell to chain other settings
-
getStyle
-
createPOICell
protected void createPOICell(JxlsWorkbook workbook, org.apache.poi.ss.usermodel.Sheet sheet, Map<Integer, JxlsStyle> columnStyles)
-