Class JxlsCell

×News: XavaPro 7.7 released - March 11 · Read more
java.lang.Object
org.openxava.util.jxls.JxlsCell

public class JxlsCell extends Object
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 Details

    • row

      protected int row
    • column

      protected int column
  • Constructor Details

    • JxlsCell

      protected JxlsCell(JxlsSheet sheet, int column, int row, JxlsStyle style)
    • JxlsCell

      protected JxlsCell(JxlsSheet sheet, int column, int row, Date date, JxlsStyle style)
    • JxlsCell

      protected JxlsCell(JxlsSheet sheet, int column, int row, double f, JxlsStyle style)
    • JxlsCell

      protected JxlsCell(JxlsSheet sheet, int column, int row, String text, JxlsStyle style, boolean isFormula)
  • Method Details

    • getXlsReference

      public static String getXlsReference(int column, int row)
    • getValue

      public Object 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

      public String getStringValue()
      Get the value of the cell as text
      Returns:
      the value as a text
    • setSpan

      public JxlsCell setSpan(int columnSpan, int rowSpan)
      Sets the span of the cell
      Parameters:
      columnSpan - the number of columns to occupy
      rowSpan - the number of rows to occupy
      Returns:
      the cell to chain other settings
    • setHyperlink

      public JxlsCell setHyperlink(String hyperlink)
      Sets the hyperlink associated with this cell
      Parameters:
      hyperlink - a url associated with the cell content
      Returns:
      the cell to chain other settings
    • getHyperlink

      public String getHyperlink()
      Gets the hyperlink associated with this cell
      Returns:
      the url
    • setStyle

      public JxlsCell setStyle(JxlsStyle style)
      Sets the style of the cell
      Parameters:
      style - the style to render the cell content
      Returns:
      the cell to chain other settings
    • getStyle

      public JxlsStyle getStyle()
    • createPOICell

      protected void createPOICell(JxlsWorkbook workbook, org.apache.poi.ss.usermodel.Sheet sheet, Map<Integer, JxlsStyle> columnStyles)