Package org.adempiere.print.export
Class PrintDataXLSXExporter
- java.lang.Object
-
- org.adempiere.impexp.AbstractXLSXExporter
-
- org.adempiere.print.export.PrintDataXLSXExporter
-
public class PrintDataXLSXExporter extends AbstractXLSXExporter
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
Constructors Constructor Description PrintDataXLSXExporter(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createParameter(org.apache.poi.xssf.usermodel.XSSFSheet sheet)
protected void
export(OutputStream out)
Export to given streamprotected void
formatPage(org.apache.poi.xssf.usermodel.XSSFSheet sheet)
protected String
getCellFormat(int row, int col)
int
getColumnCount()
Get Columns Countprotected int
getCurrentRow()
int
getDisplayType(int row, int col)
Get cell display type (seeDisplayType
)protected org.apache.poi.xssf.usermodel.XSSFCell
getFormCell(org.apache.poi.xssf.usermodel.XSSFRow row, int colnum)
get cell for column. use for form layoutprotected org.apache.poi.xssf.usermodel.XSSFRow
getFormRow(org.apache.poi.xssf.usermodel.XSSFSheet sheet, int colnum)
get row for column. use for form layoutString
getHeaderName(int col)
Get column header nameint
getRowCount()
Get Rows CountObject
getValueAt(int row, int col)
Get cell valueboolean
isColumnPrinted(int col)
Check if column is printed (displayed)boolean
isDisplayed(int row, int col)
Check if there is a display logicprotected boolean
isForm()
boolean
isFunctionRow()
Is the current Row a Function Rowboolean
isPageBreak(int row, int col)
Check if there is a page break on given cellprotected boolean
isSetFormRowPosition(int col)
protected boolean
isSuppressNull(int col)
protected boolean
isVisible(int row, int col)
protected void
setCurrentRow(int row)
Set current row-
Methods inherited from class org.adempiere.impexp.AbstractXLSXExporter
createHeaderFooter, export, export, exportToWorkbook, getCtx, getLanguage, getNoOfParameter, isCurrentRowOnly, setCurrentRowOnly, setFreezePane, setNoOfParameter
-
-
-
-
Constructor Detail
-
PrintDataXLSXExporter
public PrintDataXLSXExporter(PrintData printData, MPrintFormat printFormat)
-
PrintDataXLSXExporter
public PrintDataXLSXExporter(PrintData printData, MPrintFormat printFormat, Boolean[] colSuppressRepeats)
-
PrintDataXLSXExporter
public PrintDataXLSXExporter(PrintData printData, MPrintFormat printFormat, Map<MPrintFormatItem,PrintData> childPrintFormatDetails, Boolean[] colSuppressRepeats, MQuery query)
-
-
Method Detail
-
getColumnCount
public int getColumnCount()
Description copied from class:AbstractXLSXExporter
Get Columns Count- Specified by:
getColumnCount
in classAbstractXLSXExporter
- Returns:
- number of columns
-
getDisplayType
public int getDisplayType(int row, int col)
Description copied from class:AbstractXLSXExporter
Get cell display type (seeDisplayType
)- Specified by:
getDisplayType
in classAbstractXLSXExporter
- Parameters:
row
- row indexcol
- column index- Returns:
- display type
-
getValueAt
public Object getValueAt(int row, int col)
Description copied from class:AbstractXLSXExporter
Get cell value- Specified by:
getValueAt
in classAbstractXLSXExporter
- Parameters:
row
- row indexcol
- column index- Returns:
- cell value
-
getHeaderName
public String getHeaderName(int col)
Description copied from class:AbstractXLSXExporter
Get column header name- Specified by:
getHeaderName
in classAbstractXLSXExporter
- Parameters:
col
- column index- Returns:
- header name
-
getRowCount
public int getRowCount()
Description copied from class:AbstractXLSXExporter
Get Rows Count- Specified by:
getRowCount
in classAbstractXLSXExporter
- Returns:
- number of rows
-
isColumnPrinted
public boolean isColumnPrinted(int col)
Description copied from class:AbstractXLSXExporter
Check if column is printed (displayed)- Specified by:
isColumnPrinted
in classAbstractXLSXExporter
- Parameters:
col
- column index- Returns:
- true if is visible
-
isPageBreak
public boolean isPageBreak(int row, int col)
Description copied from class:AbstractXLSXExporter
Check if there is a page break on given cell- Specified by:
isPageBreak
in 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:AbstractXLSXExporter
Set current row- Specified by:
setCurrentRow
in classAbstractXLSXExporter
- Parameters:
row
- row index
-
getCurrentRow
protected int getCurrentRow()
- Specified by:
getCurrentRow
in classAbstractXLSXExporter
- Returns:
- current row index
-
isFunctionRow
public boolean isFunctionRow()
Description copied from class:AbstractXLSXExporter
Is the current Row a Function Row- Specified by:
isFunctionRow
in classAbstractXLSXExporter
- Returns:
- true if function row
-
formatPage
protected void formatPage(org.apache.poi.xssf.usermodel.XSSFSheet sheet)
- Overrides:
formatPage
in classAbstractXLSXExporter
-
isDisplayed
public boolean isDisplayed(int row, int col)
Description copied from class:AbstractXLSXExporter
Check if there is a display logic- Specified by:
isDisplayed
in classAbstractXLSXExporter
- Parameters:
row
- row indexcol
- column index- Returns:
- true if there is no logic or evaluate logic specified in print item
-
getCellFormat
protected String getCellFormat(int row, int col)
- Overrides:
getCellFormat
in classAbstractXLSXExporter
-
export
protected void export(OutputStream out) throws Exception
Description copied from class:AbstractXLSXExporter
Export to given stream- Overrides:
export
in classAbstractXLSXExporter
- Throws:
Exception
-
createParameter
protected void createParameter(org.apache.poi.xssf.usermodel.XSSFSheet sheet)
- Overrides:
createParameter
in classAbstractXLSXExporter
-
isForm
protected boolean isForm()
- Overrides:
isForm
in classAbstractXLSXExporter
- Returns:
- true if it is form layout
-
getFormCell
protected org.apache.poi.xssf.usermodel.XSSFCell getFormCell(org.apache.poi.xssf.usermodel.XSSFRow row, int colnum)
Description copied from class:AbstractXLSXExporter
get cell for column. use for form layout- Overrides:
getFormCell
in classAbstractXLSXExporter
- Returns:
- cell for column
-
getFormRow
protected org.apache.poi.xssf.usermodel.XSSFRow getFormRow(org.apache.poi.xssf.usermodel.XSSFSheet sheet, int colnum)
Description copied from class:AbstractXLSXExporter
get row for column. use for form layout- Overrides:
getFormRow
in classAbstractXLSXExporter
- Returns:
- row for column
-
isSetFormRowPosition
protected boolean isSetFormRowPosition(int col)
- Overrides:
isSetFormRowPosition
in classAbstractXLSXExporter
- Returns:
- true if column is use to set new row position
-
isSuppressNull
protected boolean isSuppressNull(int col)
- Overrides:
isSuppressNull
in classAbstractXLSXExporter
- Returns:
- true if column should be hidden when it is null
-
isVisible
protected boolean isVisible(int row, int col)
- Overrides:
isVisible
in classAbstractXLSXExporter
- Returns:
- true if column is visible
-
-