Package 

Class Row

  • All Implemented Interfaces:

    
    public final class Row
    extends ExcelElement
                        

    Represents a row in a sheet

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final XSSFRow xssfRow
      private final XSSFWorkbook xssfWorkbook
    • Constructor Summary

      Constructors 
      Constructor Description
      Row(XSSFWorkbook xssfWorkbook, XSSFCellStyle style, XSSFSheet xssfSheet, Integer index)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final XSSFRow getXssfRow()
      XSSFWorkbook getXssfWorkbook()
      final Unit cell(Object content, XSSFCellStyle style) Creates a new cell in the rowCell explicitly support the following data types:
      • Formula

      • Boolean

      • Number

      • Date

      • Calendar

      • LocalDate

      • LocalDateTime

      All other data types will be converted to a string to be displayed.
      • Methods inherited from class io.github.evanrupert.excelkt.Row

        createCellStyle, createFont
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Row

        Row(XSSFWorkbook xssfWorkbook, XSSFCellStyle style, XSSFSheet xssfSheet, Integer index)
        Parameters:
        xssfSheet - underlying apache poi xssfSheet where row was created
        index - the index on the sheet where row was created
    • Method Detail

      • cell

         final Unit cell(Object content, XSSFCellStyle style)

        Creates a new cell in the row

        Cell explicitly support the following data types:

        • Formula

        • Boolean

        • Number

        • Date

        • Calendar

        • LocalDate

        • LocalDateTime

        All other data types will be converted to a string to be displayed.

        Example of all data types in use:

        row {
          cell(Formula("A1 + A2"))
          cell(true)
          cell(12.2)
          cell(Date())
          cell(Calendar.getInstance())
          cell(LocalDate.now())
          cell(LocalDateTime.now())
        }
        Parameters:
        content - the content to be displayed in the cell
        style - optional cell style to be applied to this cell