Interface ExcelBuilder
- All Known Implementing Classes:
AbstractExcelBuilder
public interface ExcelBuilder
-
Method Summary
Modifier and TypeMethodDescriptionaddSheet
(ExcelSheetData data) creates a new sheet in the excel Document.addStyle
(Function<SheetLocation, Optional<org.apache.poi.ss.usermodel.CellStyle>> function) Deprecated.build()
creates a excel file using the given data fromwithHeader(List)
,withData(List)
andwithFooter(List)
build
(EntityModel model) creates a excel file using the given data fromwithHeader(List)
,withData(List)
andwithFooter(List)
com.google.common.io.FileBackedOutputStream
creates an excel and writes it to an output stream using the given data fromwithHeader(List)
,withData(List)
andwithFooter(List)
Deprecated.withFooter
(List<Object> footer) Deprecated.withHeader
(List<Object> header) Deprecated.Deprecated.
-
Method Details
-
addSheet
creates a new sheet in the excel Document. The sheets are ordered in the way they are added by using this method- Returns:
- the builder itself
-
withTitle
Deprecated.useaddSheet(ExcelSheetData)
. It allows a way more flexible sheet creation.- Parameters:
title
- the title of the excel sheet- Returns:
- the builder itself
-
withHeader
Deprecated.useaddSheet(ExcelSheetData)
. It allows a way more flexible sheet creation.- Parameters:
header
- the meta data of the excel sheet- Returns:
- the builder itself
-
withData
Deprecated.useaddSheet(ExcelSheetData)
. It allows a way more flexible sheet creation.- Parameters:
data
- the effective data of the sheet- Returns:
- the builder itself
-
addStyle
@Deprecated ExcelBuilder addStyle(Function<SheetLocation, Optional<org.apache.poi.ss.usermodel.CellStyle>> function) Deprecated.useaddSheet(ExcelSheetData)
. It allows a way more flexible sheet creation.- Parameters:
function
- a function which is applied to any cell in the excel. If it returns a cellStyle it will be applied to the cell- Returns:
- the builder itself
-
build
creates a excel file using the given data fromwithHeader(List)
,withData(List)
andwithFooter(List)
- Returns:
- the output job id of the created excel file
- Throws:
IOException
-
build
creates a excel file using the given data fromwithHeader(List)
,withData(List)
andwithFooter(List)
- Parameters:
model
- theEntityModel
which will be passed to theOutputJobBuilder
- Returns:
- the output job id of the created excel file
- Throws:
IOException
-
buildOutputStream
creates an excel and writes it to an output stream using the given data fromwithHeader(List)
,withData(List)
andwithFooter(List)
- Returns:
- outputStream output stream that contains the generated excel
- Throws:
IOException
-
addSheet(ExcelSheetData)
.