Package 

Class Workbook

  • All Implemented Interfaces:

    
    public final class Workbook
    extends ExcelElement
                        

    Represents an Excel workbook

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

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

      Constructors 
      Constructor Description
      Workbook(XSSFWorkbook xssfWorkbook, XSSFCellStyle style)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      XSSFWorkbook getXssfWorkbook()
      final Sheet sheet(String name, XSSFCellStyle style, Function1<Sheet, Unit> init) Creates a new sheet in the workbook
      final Unit write(String filename) Writes the XSSFWorkbook to the given filename
      • Methods inherited from class io.github.evanrupert.excelkt.Workbook

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

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

      • Workbook

        Workbook(XSSFWorkbook xssfWorkbook, XSSFCellStyle style)
    • Method Detail

      • sheet

         final Sheet sheet(String name, XSSFCellStyle style, Function1<Sheet, Unit> init)

        Creates a new sheet in the workbook

        Parameters:
        name - the name to be given to this sheet
        style - optional cell style to be applied to all lower elements
        init - block function where rows can be added
      • write

         final Unit write(String filename)

        Writes the XSSFWorkbook to the given filename

        Parameters:
        filename - path to which the Excel file will be written