public abstract class SuperGenerateExcelImpl extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List<DropDownCell> |
listDropDown
The list drop down.
|
protected List<FunctionCell> |
listFunctionCell
The list function cell.
|
protected Map<LayoutCell,org.apache.poi.ss.usermodel.CellStyle> |
mapCellHeaderStyle
The map cell header style.
|
protected Map<LayoutCell,org.apache.poi.ss.usermodel.CellStyle> |
mapCellStyle
The map cell style.
|
protected Map<String,InfoColumn> |
mapFieldColumn
The map field column.
|
protected Map<String,BaseSheet> |
mapSheet
The map sheet.
|
protected Map<Integer,Integer> |
mapWidthColumn
The map width column.
|
protected org.apache.poi.ss.usermodel.CellStyle |
mergeCalcoloCells
The merge calcolo cells.
|
protected static SimpleDateFormat |
SDF
The Constant SDF.
|
protected SheetMappingSheet |
sheetMapping |
protected ValueProps |
valueProps
The value props.
|
| Constructor and Description |
|---|
SuperGenerateExcelImpl()
Instantiates a new super generate excel impl.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addComment(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Row row,
org.apache.poi.ss.usermodel.Cell cellHeader,
String commento)
Adds the comment.
|
protected void |
addDropDown(DropDownCell dropDownCell)
Adds the drop down.
|
protected String |
buildFunction(org.apache.poi.ss.usermodel.Sheet sheet,
Integer indexRow,
String function,
RowStartEndType rowStartEndType)
Builds the function.
|
protected String |
buildFunction(org.apache.poi.ss.usermodel.Sheet sheet,
Integer indexRow,
String function,
RowStartEndType rowStartEndType,
boolean blockColumn,
boolean blockRow)
Builds the function.
|
protected String |
buildFunction(org.apache.poi.ss.usermodel.Sheet sheet,
Integer indexRow,
String function,
RowStartEndType rowStartEndType,
ExcelFormulaAlias[] alias)
Builds the function.
|
protected org.apache.poi.ss.usermodel.CellStyle |
createCellStyle(org.apache.poi.ss.usermodel.Workbook workbook,
ExcelCellLayout layout,
Integer indexRow)
Creates the cell style.
|
protected org.apache.poi.ss.usermodel.CellStyle |
createCellStyle(org.apache.poi.ss.usermodel.Workbook workbook,
ExcelCellLayout layout,
SheetHeader sheetHeader,
Integer indexRow)
Creates the cell style.
|
protected org.apache.poi.ss.usermodel.CellStyle |
createCellStyle(org.apache.poi.ss.usermodel.Workbook workbook,
ExcelHeaderCellLayout layout)
Creates the cell style.
|
protected Integer |
createPivot(org.apache.poi.xssf.usermodel.XSSFSheet sheet,
SheetData<?> sheetData,
int firstRow,
int firstColumn,
int lastRow,
int lastColumn,
Integer indexRow)
Creates the pivot.
|
protected org.apache.poi.ss.usermodel.CellStyle |
dateCellStyle(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.CellStyle cellStyle,
String format)
Date cell style.
|
protected <T extends RowSheet> |
generateHeaderSheetData(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
SheetData<T> sheetData,
Integer indexRow)
Generate header sheet data.
|
protected org.apache.poi.ss.usermodel.CellStyle |
getBorder(org.apache.poi.ss.usermodel.CellStyle cellStyle,
ExcelBorder excelBorder)
Gets the border.
|
org.apache.poi.ss.usermodel.CellStyle |
getCellStyleHeader(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
SheetComponent sheetComponent,
org.apache.poi.ss.usermodel.Row rowHeader)
Gets the cell style header.
|
protected org.apache.poi.xssf.usermodel.XSSFColor |
getColor(byte... rgbColor)
Gets the color.
|
protected org.apache.poi.ss.usermodel.Font |
getFont(org.apache.poi.ss.usermodel.Workbook workbook,
ExcelFont excelFont)
Gets the font.
|
protected List<SheetHeader> |
getListSheetHeader(Class<?> classRow,
Object entity,
org.apache.poi.ss.usermodel.Sheet sheet)
Gets the list sheet header.
|
protected <T extends RowSheet> |
getSizeSuperHeader(SheetData<T> sheetData)
Gets the size super header.
|
protected void |
manageDropDown(org.apache.poi.ss.usermodel.Sheet sheet,
SheetHeader sheetHeader,
int firstRow,
int lastRow,
int firstCol,
int lastCol,
Integer indexRow)
Manage drop down.
|
protected Object |
manageExcelImage(SheetHeader sheetHeader,
Object value)
Manage excel image.
|
protected void |
mergeRow(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
Integer indexRow,
Map<Integer,MergeCell> mapMergeRow,
int numColumn,
org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator)
Merge row.
|
protected void |
mergeRowAndRemoveMap(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
Integer indexRow,
Map<Integer,MergeCell> mapMergeRow,
int numColumn,
org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator)
Merge row and remove map.
|
protected void |
runMergeCell(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
MergeCell mergeCell,
org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator)
Run merge cell.
|
protected void |
setCellFormula(org.apache.poi.ss.usermodel.Cell cell,
org.apache.poi.ss.usermodel.CellStyle cellStyle,
SheetHeader sheetHeader,
Integer indexRow,
org.apache.poi.ss.usermodel.Sheet sheet)
Sets the cell formula.
|
protected org.apache.poi.ss.usermodel.Cell |
setCellFormula(org.apache.poi.ss.usermodel.Sheet sheet,
MergeCell mergeRow,
Integer indexRow)
Sets the cell formula.
|
protected void |
setCellFormulaAndEvaluate(org.apache.poi.ss.usermodel.Sheet sheet,
MergeCell mergeRow,
Integer indexRow,
org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator)
Sets the cell formula excel.
|
protected void |
setCellFormulaAndEvaluateCell(org.apache.poi.ss.usermodel.Cell cell,
org.apache.poi.ss.usermodel.CellStyle cellStyle,
SheetHeader sheetHeader,
Integer indexRow,
org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator)
Sets the cell formula excel.
|
protected void |
setCellStyleExcel(org.apache.poi.ss.usermodel.CellStyle cellStyle,
org.apache.poi.ss.usermodel.Cell cell,
LayoutCell layoutCell)
Sets the cell style excel.
|
protected void |
setCellSummary(ExcelSheetLayout excelSheetLayout,
org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
SheetSummary sheetSummary,
SheetHeader sheetHeader,
org.apache.poi.ss.usermodel.Row row,
Integer indexRow,
org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator)
Sets the cell summary.
|
protected void |
setCellValueExcel(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Cell cell,
org.apache.poi.ss.usermodel.CellStyle cellStyle,
SheetHeader sheetHeader,
Integer indexRow,
org.apache.poi.ss.usermodel.Sheet sheet)
Sets the cell value excel.
|
protected void |
setCellValueExcel(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Cell cell,
org.apache.poi.ss.usermodel.CellStyle cellStyle,
SheetHeader sheetHeader,
Integer indexRow,
org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator)
Sets the cell value excel.
|
protected boolean |
setCellValueWillMerged(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.CellStyle cellStyle,
org.apache.poi.ss.usermodel.Cell cell,
SheetHeader sheetHeader,
Integer indexRow,
org.apache.poi.ss.usermodel.Sheet sheet)
Sets the cell value will merged.
|
protected void |
setColumnWidth(org.apache.poi.ss.usermodel.Sheet sheet,
Integer indexColumn,
Integer width)
Sets the column width.
|
protected static final SimpleDateFormat SDF
protected org.apache.poi.ss.usermodel.CellStyle mergeCalcoloCells
protected Map<LayoutCell,org.apache.poi.ss.usermodel.CellStyle> mapCellStyle
protected Map<LayoutCell,org.apache.poi.ss.usermodel.CellStyle> mapCellHeaderStyle
protected Map<String,InfoColumn> mapFieldColumn
protected List<FunctionCell> listFunctionCell
protected List<DropDownCell> listDropDown
protected SheetMappingSheet sheetMapping
@Autowired protected ValueProps valueProps
public SuperGenerateExcelImpl()
protected org.apache.poi.ss.usermodel.CellStyle createCellStyle(org.apache.poi.ss.usermodel.Workbook workbook,
ExcelHeaderCellLayout layout)
workbook - the workbooklayout - the layoutprotected org.apache.poi.ss.usermodel.CellStyle createCellStyle(org.apache.poi.ss.usermodel.Workbook workbook,
ExcelCellLayout layout,
Integer indexRow)
throws Exception
workbook - the workbooklayout - the layoutindexRow - the index rowException - the exceptionprotected org.apache.poi.ss.usermodel.CellStyle createCellStyle(org.apache.poi.ss.usermodel.Workbook workbook,
ExcelCellLayout layout,
SheetHeader sheetHeader,
Integer indexRow)
throws Exception
workbook - the workbooklayout - the layoutsheetHeader - the sheet headerindexRow - the index rowException - the exceptionprotected org.apache.poi.ss.usermodel.Font getFont(org.apache.poi.ss.usermodel.Workbook workbook,
ExcelFont excelFont)
workbook - the workbookexcelFont - the excel fontprotected org.apache.poi.xssf.usermodel.XSSFColor getColor(byte... rgbColor)
rgbColor - the rgb colorprotected org.apache.poi.ss.usermodel.CellStyle getBorder(org.apache.poi.ss.usermodel.CellStyle cellStyle,
ExcelBorder excelBorder)
cellStyle - the cell styleexcelBorder - the excel borderprotected List<SheetHeader> getListSheetHeader(Class<?> classRow, Object entity, org.apache.poi.ss.usermodel.Sheet sheet) throws Exception
classRow - the class rowentity - the entitysheet - the sheetException - the exceptionprotected boolean setCellValueWillMerged(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.CellStyle cellStyle,
org.apache.poi.ss.usermodel.Cell cell,
SheetHeader sheetHeader,
Integer indexRow,
org.apache.poi.ss.usermodel.Sheet sheet)
throws Exception
workbook - the workbookcellStyle - the cell stylecell - the cellsheetHeader - the sheet headerindexRow - the index rowsheet - the sheetException - the exceptionprotected void mergeRowAndRemoveMap(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
Integer indexRow,
Map<Integer,MergeCell> mapMergeRow,
int numColumn,
org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator)
throws Exception
workbook - the workbooksheet - the sheetindexRow - the index rowmapMergeRow - the map merge rownumColumn - the num columnformulaEvaluator - the formula evaluatorException - the exceptionprotected void mergeRow(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
Integer indexRow,
Map<Integer,MergeCell> mapMergeRow,
int numColumn,
org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator)
throws Exception
workbook - the workbooksheet - the sheetindexRow - the index rowmapMergeRow - the map merge rownumColumn - the num columnformulaEvaluator - the formula evaluatorException - the exceptionprotected void runMergeCell(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
MergeCell mergeCell,
org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator)
throws Exception
workbook - the workbooksheet - the sheetmergeCell - the merge cellformulaEvaluator - the formula evaluatorException - the exceptionprotected void addComment(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Row row,
org.apache.poi.ss.usermodel.Cell cellHeader,
String commento)
workbook - the workbooksheet - the sheetrow - the rowcellHeader - the cell headercommento - the commentoprotected void setCellSummary(ExcelSheetLayout excelSheetLayout, org.apache.poi.ss.usermodel.Workbook workbook, org.apache.poi.ss.usermodel.Sheet sheet, SheetSummary sheetSummary, SheetHeader sheetHeader, org.apache.poi.ss.usermodel.Row row, Integer indexRow, org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator) throws Exception
excelSheetLayout - the excel sheet layoutworkbook - the workbooksheet - the sheetsheetSummary - the sheet summarysheetHeader - the sheet headerrow - the rowindexRow - the index rowformulaEvaluator - the formula evaluatorException - the exceptionprotected void setCellValueExcel(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Cell cell,
org.apache.poi.ss.usermodel.CellStyle cellStyle,
SheetHeader sheetHeader,
Integer indexRow,
org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator)
throws Exception
workbook - the workbooksheet - the sheetcell - the cellcellStyle - the cell stylesheetHeader - the sheet headerindexRow - the index rowformulaEvaluator - the formula evaluatorException - the exceptionprotected void setCellFormulaAndEvaluateCell(org.apache.poi.ss.usermodel.Cell cell,
org.apache.poi.ss.usermodel.CellStyle cellStyle,
SheetHeader sheetHeader,
Integer indexRow,
org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator)
throws Exception
cell - the cellcellStyle - the cell stylesheetHeader - the sheet headerindexRow - the index rowsheet - the sheetformulaEvaluator - the formula evaluatorException - the exceptionprotected void setCellFormula(org.apache.poi.ss.usermodel.Cell cell,
org.apache.poi.ss.usermodel.CellStyle cellStyle,
SheetHeader sheetHeader,
Integer indexRow,
org.apache.poi.ss.usermodel.Sheet sheet)
throws Exception
cell - the cellcellStyle - the cell stylesheetHeader - the sheet headerindexRow - the index rowsheet - the sheetException - the exceptionprotected String buildFunction(org.apache.poi.ss.usermodel.Sheet sheet, Integer indexRow, String function, RowStartEndType rowStartEndType, ExcelFormulaAlias[] alias) throws Exception
sheet - the sheetindexRow - the index rowfunction - the functionrowStartEndType - the row start end typealias - the aliasException - the exceptionprotected String buildFunction(org.apache.poi.ss.usermodel.Sheet sheet, Integer indexRow, String function, RowStartEndType rowStartEndType, boolean blockColumn, boolean blockRow) throws Exception
sheet - the sheetindexRow - the index rowfunction - the functionrowStartEndType - the row start end typeblockColumn - the dollarblockRow - the block rowException - the exceptionprotected String buildFunction(org.apache.poi.ss.usermodel.Sheet sheet, Integer indexRow, String function, RowStartEndType rowStartEndType) throws Exception
sheet - the sheetindexRow - the index rowfunction - the functionrowStartEndType - the row start end typeException - the exceptionprotected void setCellFormulaAndEvaluate(org.apache.poi.ss.usermodel.Sheet sheet,
MergeCell mergeRow,
Integer indexRow,
org.apache.poi.ss.usermodel.FormulaEvaluator formulaEvaluator)
throws Exception
sheet - the sheetmergeRow - the merge rowindexRow - the index rowformulaEvaluator - the formula evaluatorException - the exceptionprotected org.apache.poi.ss.usermodel.Cell setCellFormula(org.apache.poi.ss.usermodel.Sheet sheet,
MergeCell mergeRow,
Integer indexRow)
throws Exception
sheet - the sheetmergeRow - the merge rowindexRow - the index rowException - the exceptionprotected void setCellValueExcel(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Cell cell,
org.apache.poi.ss.usermodel.CellStyle cellStyle,
SheetHeader sheetHeader,
Integer indexRow,
org.apache.poi.ss.usermodel.Sheet sheet)
throws Exception
workbook - the workbookcell - the cellcellStyle - the cell stylesheetHeader - the sheet headerindexRow - the index rowsheet - the sheetException - the exceptionprotected org.apache.poi.ss.usermodel.CellStyle dateCellStyle(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.CellStyle cellStyle,
String format)
throws Exception
workbook - the workbookcellStyle - the cell styleformat - the formatException - the exceptionprotected void setCellStyleExcel(org.apache.poi.ss.usermodel.CellStyle cellStyle,
org.apache.poi.ss.usermodel.Cell cell,
LayoutCell layoutCell)
cellStyle - the cell stylecell - the celllayoutCell - the layout cellpublic org.apache.poi.ss.usermodel.CellStyle getCellStyleHeader(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
SheetComponent sheetComponent,
org.apache.poi.ss.usermodel.Row rowHeader)
throws Exception
workbook - the workbooksheet - the sheetsheetComponent - the sheet componentrowHeader - the row headerException - the exceptionprotected <T extends RowSheet> List<SheetHeader> generateHeaderSheetData(org.apache.poi.ss.usermodel.Workbook workbook, org.apache.poi.ss.usermodel.Sheet sheet, SheetData<T> sheetData, Integer indexRow) throws Exception
T - the generic typeworkbook - the workbooksheet - the sheetsheetData - the sheet dataindexRow - the index rowException - the exceptionprotected <T extends RowSheet> int getSizeSuperHeader(SheetData<T> sheetData)
T - the generic typesheetData - the sheet dataprotected void setColumnWidth(org.apache.poi.ss.usermodel.Sheet sheet,
Integer indexColumn,
Integer width)
throws Exception
sheet - the sheetindexColumn - the index columnwidth - the widthException - the exceptionprotected Integer createPivot(org.apache.poi.xssf.usermodel.XSSFSheet sheet, SheetData<?> sheetData, int firstRow, int firstColumn, int lastRow, int lastColumn, Integer indexRow)
sheet - the sheetsheetData - the sheet datafirstRow - the first rowfirstColumn - the first columnlastRow - the last rowlastColumn - the last columnindexRow - the index rowprotected void manageDropDown(org.apache.poi.ss.usermodel.Sheet sheet,
SheetHeader sheetHeader,
int firstRow,
int lastRow,
int firstCol,
int lastCol,
Integer indexRow)
sheet - the sheetsheetHeader - the sheet headerfirstRow - the first rowlastRow - the last rowfirstCol - the first collastCol - the last colprotected void addDropDown(DropDownCell dropDownCell) throws Exception
dropDownCell - the drop down cellException - the exceptionprotected Object manageExcelImage(SheetHeader sheetHeader, Object value) throws Exception, FileNotFoundException, IOException
sheetHeader - the sheet headervalue - the valueException - the exceptionFileNotFoundException - the file not found exceptionIOException - Signals that an I/O exception has occurred.Copyright © 2022. All rights reserved.