public class DataTableExcelExporter extends DataTableExporter
DataTableExporter.ColumnType
Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_FONT |
Constructor and Description |
---|
DataTableExcelExporter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addColumnFacets(DataTable table,
org.apache.poi.ss.usermodel.Sheet sheet,
DataTableExporter.ColumnType columnType) |
protected void |
addColumnValue(org.apache.poi.ss.usermodel.Row row,
List<javax.faces.component.UIComponent> components,
UIColumn column) |
protected void |
addColumnValue(org.apache.poi.ss.usermodel.Row row,
String value) |
protected void |
addColumnValue(org.apache.poi.ss.usermodel.Row row,
javax.faces.component.UIComponent component) |
protected void |
applyCellOptions(org.apache.poi.ss.usermodel.Workbook wb,
ExporterOptions options,
org.apache.poi.ss.usermodel.CellStyle cellStyle) |
protected void |
applyFacetOptions(org.apache.poi.ss.usermodel.Workbook wb,
ExporterOptions options,
org.apache.poi.ss.usermodel.CellStyle facetStyle) |
protected void |
applyOptions(org.apache.poi.ss.usermodel.Workbook wb,
DataTable table,
org.apache.poi.ss.usermodel.Sheet sheet,
ExporterOptions options) |
protected org.apache.poi.ss.usermodel.RichTextString |
createRichTextString(String value) |
protected org.apache.poi.ss.usermodel.Sheet |
createSheet(org.apache.poi.ss.usermodel.Workbook wb,
String sheetName,
ExcelOptions options) |
protected org.apache.poi.ss.usermodel.Workbook |
createWorkBook() |
void |
doExport(javax.faces.context.FacesContext context,
DataTable table,
ExportConfiguration config,
int index)
Export datatable
|
protected void |
exportCells(DataTable table,
Object document) |
void |
exportTable(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
org.apache.poi.ss.usermodel.Sheet sheet,
boolean pageOnly,
boolean selectionOnly) |
protected String |
getContentDisposition(String filename) |
protected String |
getContentType() |
org.apache.poi.ss.usermodel.Font |
getFont(org.apache.poi.ss.usermodel.Workbook wb,
ExporterOptions options) |
String |
getSheetName(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent table) |
protected org.apache.poi.ss.usermodel.Workbook |
getWorkBook() |
protected void |
postExport(javax.faces.context.FacesContext context,
ExportConfiguration config) |
protected void |
preExport(javax.faces.context.FacesContext context,
ExportConfiguration config) |
protected void |
reset() |
protected void |
writeExcelToResponse(javax.faces.context.ExternalContext externalContext,
org.apache.poi.ss.usermodel.Workbook generatedExcel,
String filename) |
export, exportAll, exportColumnByFunction, exportPageOnly, exportRow, exportRow, exportSelectionOnly, exportValue, getColumnsToExport, hasColumnFooter, postRowExport, preRowExport
protected static final String DEFAULT_FONT
protected void preExport(javax.faces.context.FacesContext context, ExportConfiguration config) throws IOException
preExport
in class DataTableExporter
IOException
public void doExport(javax.faces.context.FacesContext context, DataTable table, ExportConfiguration config, int index) throws IOException
DataTableExporter
doExport
in class DataTableExporter
context
- faces contexttable
- datatable to exportconfig
- export configurationindex
- datatable current index during export processIOException
protected void postExport(javax.faces.context.FacesContext context, ExportConfiguration config) throws IOException
postExport
in class DataTableExporter
IOException
protected void reset() throws IOException
IOException
protected void exportCells(DataTable table, Object document)
exportCells
in class DataTableExporter
protected void addColumnFacets(DataTable table, org.apache.poi.ss.usermodel.Sheet sheet, DataTableExporter.ColumnType columnType)
protected void addColumnValue(org.apache.poi.ss.usermodel.Row row, javax.faces.component.UIComponent component)
protected void addColumnValue(org.apache.poi.ss.usermodel.Row row, String value)
protected void addColumnValue(org.apache.poi.ss.usermodel.Row row, List<javax.faces.component.UIComponent> components, UIColumn column)
protected org.apache.poi.ss.usermodel.RichTextString createRichTextString(String value)
protected org.apache.poi.ss.usermodel.Workbook createWorkBook()
protected org.apache.poi.ss.usermodel.Workbook getWorkBook()
protected org.apache.poi.ss.usermodel.Sheet createSheet(org.apache.poi.ss.usermodel.Workbook wb, String sheetName, ExcelOptions options)
protected void writeExcelToResponse(javax.faces.context.ExternalContext externalContext, org.apache.poi.ss.usermodel.Workbook generatedExcel, String filename) throws IOException
IOException
protected String getContentType()
public void exportTable(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, org.apache.poi.ss.usermodel.Sheet sheet, boolean pageOnly, boolean selectionOnly)
protected void applyOptions(org.apache.poi.ss.usermodel.Workbook wb, DataTable table, org.apache.poi.ss.usermodel.Sheet sheet, ExporterOptions options)
protected void applyFacetOptions(org.apache.poi.ss.usermodel.Workbook wb, ExporterOptions options, org.apache.poi.ss.usermodel.CellStyle facetStyle)
protected void applyCellOptions(org.apache.poi.ss.usermodel.Workbook wb, ExporterOptions options, org.apache.poi.ss.usermodel.CellStyle cellStyle)
public String getSheetName(javax.faces.context.FacesContext context, javax.faces.component.UIComponent table)
public org.apache.poi.ss.usermodel.Font getFont(org.apache.poi.ss.usermodel.Workbook wb, ExporterOptions options)
Copyright © 2020. All rights reserved.