Package org.adempiere.print.export
Class PrintDataExcelExporter
- java.lang.Object
-
- org.adempiere.impexp.AbstractExcelExporter
-
- org.adempiere.print.export.PrintDataExcelExporter
-
public class PrintDataExcelExporter extends AbstractExcelExporter
Export PrintData to Excel (XLS) file- Author:
- Teo Sarca, SC ARHIPAC SERVICE SRL
- BF [ 1939010 ] Excel Export ERROR - java.sql.Date - integrated Mario Grigioni's fix
- BF [ 1974309 ] Exporting a report to XLS is not setting page format
-
-
Field Summary
-
Fields inherited from class org.adempiere.impexp.AbstractExcelExporter
colSuppressRepeats, log, m_lang, m_workbook
-
-
Constructor Summary
Constructors Constructor Description PrintDataExcelExporter(PrintData printData, MPrintFormat printFormat)PrintDataExcelExporter(PrintData printData, MPrintFormat printFormat, Map<MPrintFormatItem,PrintData> childPrintFormatDetails, Boolean[] colSuppressRepeats)PrintDataExcelExporter(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 voidcreateParameter(org.apache.poi.hssf.usermodel.HSSFSheet sheet)protected voidexport(OutputStream out)Export to given streamprotected voidformatPage(org.apache.poi.hssf.usermodel.HSSFSheet sheet)protected StringgetCellFormat(int row, int col)intgetColumnCount()Get Columns Countprotected intgetCurrentRow()intgetDisplayType(int row, int col)Get cell display type (seeDisplayType)protected org.apache.poi.hssf.usermodel.HSSFCellgetFormCell(org.apache.poi.hssf.usermodel.HSSFRow row, int colnum)get cell for column. use for form layoutprotected org.apache.poi.hssf.usermodel.HSSFRowgetFormRow(org.apache.poi.hssf.usermodel.HSSFSheet sheet, int colnum)get row for column. use for form layoutStringgetHeaderName(int col)Get column header nameintgetRowCount()Get Rows CountObjectgetValueAt(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()booleanisFunctionRow()Is 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 row-
Methods inherited from class org.adempiere.impexp.AbstractExcelExporter
createHeaderFooter, export, export, exportToWorkbook, getCtx, getLanguage, getNoOfParameter, isCurrentRowOnly, setCurrentRowOnly, setFreezePane, setNoOfParameter
-
-
-
-
Constructor Detail
-
PrintDataExcelExporter
public PrintDataExcelExporter(PrintData printData, MPrintFormat printFormat)
-
PrintDataExcelExporter
public PrintDataExcelExporter(PrintData printData, MPrintFormat printFormat, Map<MPrintFormatItem,PrintData> childPrintFormatDetails, Boolean[] colSuppressRepeats)
-
PrintDataExcelExporter
public PrintDataExcelExporter(PrintData printData, MPrintFormat printFormat, Map<MPrintFormatItem,PrintData> childPrintFormatDetails, Boolean[] colSuppressRepeats, MQuery query)
-
-
Method Detail
-
getColumnCount
public int getColumnCount()
Description copied from class:AbstractExcelExporterGet Columns Count- Specified by:
getColumnCountin classAbstractExcelExporter- Returns:
- number of columns
-
getDisplayType
public int getDisplayType(int row, int col)Description copied from class:AbstractExcelExporterGet cell display type (seeDisplayType)- Specified by:
getDisplayTypein classAbstractExcelExporter- Parameters:
row- row indexcol- column index- Returns:
- display type
-
getValueAt
public Object getValueAt(int row, int col)
Description copied from class:AbstractExcelExporterGet cell value- Specified by:
getValueAtin classAbstractExcelExporter- Parameters:
row- row indexcol- column index- Returns:
- cell value
-
getHeaderName
public String getHeaderName(int col)
Description copied from class:AbstractExcelExporterGet column header name- Specified by:
getHeaderNamein classAbstractExcelExporter- Parameters:
col- column index- Returns:
- header name
-
getRowCount
public int getRowCount()
Description copied from class:AbstractExcelExporterGet Rows Count- Specified by:
getRowCountin classAbstractExcelExporter- Returns:
- number of rows
-
isColumnPrinted
public boolean isColumnPrinted(int col)
Description copied from class:AbstractExcelExporterCheck if column is printed (displayed)- Specified by:
isColumnPrintedin classAbstractExcelExporter- Parameters:
col- column index- Returns:
- true if is visible
-
isPageBreak
public boolean isPageBreak(int row, int col)Description copied from class:AbstractExcelExporterCheck if there is a page break on given cell- Specified by:
isPageBreakin classAbstractExcelExporter- Parameters:
row- row indexcol- column index- Returns:
- true if there is a page break
-
setCurrentRow
protected void setCurrentRow(int row)
Description copied from class:AbstractExcelExporterSet current row- Specified by:
setCurrentRowin classAbstractExcelExporter- Parameters:
row- row index
-
getCurrentRow
protected int getCurrentRow()
- Specified by:
getCurrentRowin classAbstractExcelExporter- Returns:
- current row index
-
isFunctionRow
public boolean isFunctionRow()
Description copied from class:AbstractExcelExporterIs the current Row a Function Row- Specified by:
isFunctionRowin classAbstractExcelExporter- Returns:
- true if function row
-
formatPage
protected void formatPage(org.apache.poi.hssf.usermodel.HSSFSheet sheet)
- Overrides:
formatPagein classAbstractExcelExporter
-
getCellFormat
protected String getCellFormat(int row, int col)
- Overrides:
getCellFormatin classAbstractExcelExporter
-
export
protected void export(OutputStream out) throws Exception
Description copied from class:AbstractExcelExporterExport to given stream- Overrides:
exportin classAbstractExcelExporter- Throws:
Exception
-
createParameter
protected void createParameter(org.apache.poi.hssf.usermodel.HSSFSheet sheet)
- Overrides:
createParameterin classAbstractExcelExporter
-
isForm
protected boolean isForm()
- Overrides:
isFormin classAbstractExcelExporter- Returns:
- true if it is form layout
-
getFormCell
protected org.apache.poi.hssf.usermodel.HSSFCell getFormCell(org.apache.poi.hssf.usermodel.HSSFRow row, int colnum)Description copied from class:AbstractExcelExporterget cell for column. use for form layout- Overrides:
getFormCellin classAbstractExcelExporter- Returns:
- cell for column
-
getFormRow
protected org.apache.poi.hssf.usermodel.HSSFRow getFormRow(org.apache.poi.hssf.usermodel.HSSFSheet sheet, int colnum)Description copied from class:AbstractExcelExporterget row for column. use for form layout- Overrides:
getFormRowin classAbstractExcelExporter- Returns:
- row for column
-
isSetFormRowPosition
protected boolean isSetFormRowPosition(int col)
- Overrides:
isSetFormRowPositionin classAbstractExcelExporter- Returns:
- true if column is use to set new row position
-
isSuppressNull
protected boolean isSuppressNull(int col)
- Overrides:
isSuppressNullin classAbstractExcelExporter- Returns:
- true if column should be hidden when it is null
-
isVisible
protected boolean isVisible(int row, int col)- Overrides:
isVisiblein classAbstractExcelExporter- Returns:
- true if column is visible
-
isDisplayed
public boolean isDisplayed(int row, int col)Description copied from class:AbstractExcelExporterCheck if there is a display logic- Specified by:
isDisplayedin classAbstractExcelExporter- Parameters:
row- row indexcol- column index- Returns:
- true if there is no logic or evaluate logic specified in print item
-
-