Class JxlsCell


  • public class JxlsCell
    extends java.lang.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 Detail

      • row

        protected int row
      • column

        protected int column
    • Constructor Detail

      • JxlsCell

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

        protected JxlsCell​(JxlsSheet sheet,
                           int column,
                           int row,
                           java.util.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,
                           java.lang.String text,
                           JxlsStyle style,
                           boolean isFormula)
    • Method Detail

      • getXlsReference

        public static java.lang.String getXlsReference​(int column,
                                                       int row)
      • getValue

        public java.lang.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 java.lang.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​(java.lang.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 java.lang.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
      • createPOICell

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