Class ExcelSheetData
java.lang.Object
ch.tocco.nice2.reporting.api.excel.ExcelSheetData
representation of the a excel sheet.
 Use this class together with 
ExcelBuilder to create excel files.- 
Method SummaryModifier and TypeMethodDescriptionadd a single line to the sheet.add multiple rows to the sheet.addStyle(Function<SheetLocation, Optional<org.apache.poi.ss.usermodel.CellStyle>> function) static ExcelSheetDataCreates aExcelSheetDatainstance.getData()List<Function<SheetLocation, Optional<org.apache.poi.ss.usermodel.CellStyle>>> getTitle()voidsetMetadata(Metadata metadata) withFooter(List<Object> footer) Add a footer row to the sheet.withHeader(List<Object> header) add a header row to the sheet.Add a title row to the sheet.
- 
Method Details- 
createCreates aExcelSheetDatainstance.- Parameters:
- sheetName- the name of the sheet
 
- 
withTitleAdd a title row to the sheet. The title will always be the first row.- Parameters:
- title- the title of the excel sheet.
 
- 
withHeaderadd a header row to the sheet. If no title is provided usingwithTitle(List)this will be the first row.- Parameters:
- header- the header of the excel sheet
 
- 
setMetadata
- 
addLineadd a single line to the sheet.- Parameters:
- line- row to add
 
- 
addLinesadd multiple rows to the sheet. This method won't replace data. It appends the given rows to the existing ones.- Parameters:
- lines- mutiple rows to add
 
- 
addStylepublic ExcelSheetData addStyle(Function<SheetLocation, Optional<org.apache.poi.ss.usermodel.CellStyle>> function) - 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
 
- 
getSheetName
- 
getTitle
- 
getHeader
- 
getStyleFunctionspublic List<Function<SheetLocation,Optional<org.apache.poi.ss.usermodel.CellStyle>>> getStyleFunctions()
- 
getMetadata
- 
getData
 
-