Package org.adempiere.print.export
Class PrintDataXLSXExporter
java.lang.Object
org.adempiere.impexp.AbstractXLSXExporter
org.adempiere.print.export.PrintDataXLSXExporter
Export PrintData to Excel (XLSX) file
- Author:
- Deepak Pansheriya
-
Field Summary
Fields inherited from class org.adempiere.impexp.AbstractXLSXExporter
colSuppressRepeats, log, m_lang, m_workbook -
Constructor Summary
ConstructorsConstructorDescriptionPrintDataXLSXExporter(PrintData printData, MPrintFormat printFormat) PrintDataXLSXExporter(PrintData printData, MPrintFormat printFormat, Boolean[] colSuppressRepeats) PrintDataXLSXExporter(PrintData printData, MPrintFormat printFormat, Map<MPrintFormatItem, PrintData> childPrintFormatDetails, Boolean[] colSuppressRepeats, MQuery query) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateParameter(org.apache.poi.ss.usermodel.Sheet sheet) Create parameterprotected voidexport(OutputStream out) Export to given streamprotected voidformatPage(org.apache.poi.ss.usermodel.Sheet sheet) Format sheetprotected StringgetCellFormat(int row, int col) intGet Columns Countprotected intintgetDisplayType(int row, int col) Get cell display type (seeDisplayType)protected org.apache.poi.ss.usermodel.CellgetFormCell(org.apache.poi.ss.usermodel.Row row, int colnum) get cell for column. use for form layoutprotected org.apache.poi.ss.usermodel.RowgetFormRow(org.apache.poi.ss.usermodel.Sheet sheet, int colnum) get row for column. use for form layoutgetHeaderName(int col) Get column header nameintGet Rows CountgetValueAt(int row, int col) Get cell valuebooleanisColumnPrinted(int col) Check if column is printed (displayed)booleanisDisplayed(int row, int col) Check if there is a display logicprotected booleanisForm()booleanIs the current Row a Function RowbooleanisPageBreak(int row, int col) Check if there is a page break on given cellprotected booleanisSetFormRowPosition(int col) protected booleanisSuppressNull(int col) protected booleanisVisible(int row, int col) protected voidsetCurrentRow(int row) Set current rowMethods inherited from class org.adempiere.impexp.AbstractXLSXExporter
createHeaderFooter, export, export, exportToWorkbook, getCtx, getLanguage, getNoOfParameter, isCurrentRowOnly, setCurrentRowOnly, setFreezePane, setNoOfParameter
-
Constructor Details
-
PrintDataXLSXExporter
- Parameters:
printData-printFormat-
-
PrintDataXLSXExporter
public PrintDataXLSXExporter(PrintData printData, MPrintFormat printFormat, Boolean[] colSuppressRepeats) - Parameters:
printData-printFormat-colSuppressRepeats-
-
PrintDataXLSXExporter
public PrintDataXLSXExporter(PrintData printData, MPrintFormat printFormat, Map<MPrintFormatItem, PrintData> childPrintFormatDetails, Boolean[] colSuppressRepeats, MQuery query) - Parameters:
printData-printFormat-childPrintFormatDetails-colSuppressRepeats-query-
-
-
Method Details
-
getColumnCount
public int getColumnCount()Description copied from class:AbstractXLSXExporterGet Columns Count- Specified by:
getColumnCountin classAbstractXLSXExporter- Returns:
- number of columns
-
getDisplayType
public int getDisplayType(int row, int col) Description copied from class:AbstractXLSXExporterGet cell display type (seeDisplayType)- Specified by:
getDisplayTypein classAbstractXLSXExporter- Parameters:
row- row indexcol- column index- Returns:
- display type
-
getValueAt
Description copied from class:AbstractXLSXExporterGet cell value- Specified by:
getValueAtin classAbstractXLSXExporter- Parameters:
row- row indexcol- column index- Returns:
- cell value
-
getHeaderName
Description copied from class:AbstractXLSXExporterGet column header name- Specified by:
getHeaderNamein classAbstractXLSXExporter- Parameters:
col- column index- Returns:
- header name
-
getRowCount
public int getRowCount()Description copied from class:AbstractXLSXExporterGet Rows Count- Specified by:
getRowCountin classAbstractXLSXExporter- Returns:
- number of rows
-
isColumnPrinted
public boolean isColumnPrinted(int col) Description copied from class:AbstractXLSXExporterCheck if column is printed (displayed)- Specified by:
isColumnPrintedin classAbstractXLSXExporter- Parameters:
col- column index- Returns:
- true if is visible
-
isPageBreak
public boolean isPageBreak(int row, int col) Description copied from class:AbstractXLSXExporterCheck if there is a page break on given cell- Specified by:
isPageBreakin classAbstractXLSXExporter- Parameters:
row- row indexcol- column index- Returns:
- true if there is a page break
-
setCurrentRow
protected void setCurrentRow(int row) Description copied from class:AbstractXLSXExporterSet current row- Specified by:
setCurrentRowin classAbstractXLSXExporter- Parameters:
row- row index
-
getCurrentRow
protected int getCurrentRow()- Specified by:
getCurrentRowin classAbstractXLSXExporter- Returns:
- current row index
-
isFunctionRow
public boolean isFunctionRow()Description copied from class:AbstractXLSXExporterIs the current Row a Function Row- Specified by:
isFunctionRowin classAbstractXLSXExporter- Returns:
- true if function row
-
formatPage
protected void formatPage(org.apache.poi.ss.usermodel.Sheet sheet) Description copied from class:AbstractXLSXExporterFormat sheet- Overrides:
formatPagein classAbstractXLSXExporter
-
isDisplayed
public boolean isDisplayed(int row, int col) Description copied from class:AbstractXLSXExporterCheck if there is a display logic- Specified by:
isDisplayedin classAbstractXLSXExporter- Parameters:
row- row indexcol- column index- Returns:
- true if there is no logic or evaluate logic specified in print item
-
getCellFormat
- Overrides:
getCellFormatin classAbstractXLSXExporter- Returns:
- Excel format pattern for cell
-
export
Description copied from class:AbstractXLSXExporterExport to given stream- Overrides:
exportin classAbstractXLSXExporter- Throws:
Exception
-
createParameter
protected void createParameter(org.apache.poi.ss.usermodel.Sheet sheet) Description copied from class:AbstractXLSXExporterCreate parameter- Overrides:
createParameterin classAbstractXLSXExporter
-
isForm
protected boolean isForm()- Overrides:
isFormin classAbstractXLSXExporter- Returns:
- true if it is form layout
-
getFormCell
protected org.apache.poi.ss.usermodel.Cell getFormCell(org.apache.poi.ss.usermodel.Row row, int colnum) Description copied from class:AbstractXLSXExporterget cell for column. use for form layout- Overrides:
getFormCellin classAbstractXLSXExporter- Returns:
- cell for column
-
getFormRow
protected org.apache.poi.ss.usermodel.Row getFormRow(org.apache.poi.ss.usermodel.Sheet sheet, int colnum) Description copied from class:AbstractXLSXExporterget row for column. use for form layout- Overrides:
getFormRowin classAbstractXLSXExporter- Returns:
- row for column
-
isSetFormRowPosition
protected boolean isSetFormRowPosition(int col) - Overrides:
isSetFormRowPositionin classAbstractXLSXExporter- Returns:
- true if column is use to set new row position
-
isSuppressNull
protected boolean isSuppressNull(int col) - Overrides:
isSuppressNullin classAbstractXLSXExporter- Returns:
- true if column should be hidden when it is null
-
isVisible
protected boolean isVisible(int row, int col) - Overrides:
isVisiblein classAbstractXLSXExporter- Returns:
- true if cell is visible
-