public class Exports extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Exports.PivotExportCell
The cell unit for exporting to sheet-based format.
|
static interface |
Exports.PivotExportContext
A context object containing information required for exporting to other files
|
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_FORMAT
Default file format for exporting to excel.
|
| Constructor and Description |
|---|
Exports() |
| Modifier and Type | Method and Description |
|---|---|
static void |
exportCSV(OutputStream out,
Exports.PivotExportContext context)
Export Pivottable to CSV format, with comma as separator
|
static void |
exportCSV(OutputStream out,
Exports.PivotExportContext context,
String separator)
Export Pivottable to CSV format.
|
static void |
exportExcel(OutputStream out,
Exports.PivotExportContext context)
Export Pivottable to default Excel 2007 format
|
static void |
exportExcel(OutputStream out,
String fileFormat,
Exports.PivotExportContext context)
Export Pivottable to excel format.
|
static void |
exportExcel(OutputStream out,
String fileFormat,
Exports.PivotExportContext context,
CellStyleConfigurator styleConfig)
Export Pivottable to excel format.
|
static void |
exportExcel(OutputStream out,
org.zkoss.poi.ss.usermodel.Workbook book,
Exports.PivotExportContext context)
Export Pivottable to excel format.
|
static void |
exportExcel(OutputStream out,
org.zkoss.poi.ss.usermodel.Workbook book,
Exports.PivotExportContext context,
CellStyleConfigurator styleConfig)
Export Pivottable to excel format.
|
static Exports.PivotExportContext |
getExportContext(PivotModel model,
PivotRenderer renderer,
String dataFieldOrient,
boolean open,
String[] titles)
Return a context for exporting Pivottable information
|
static Exports.PivotExportContext |
getExportContext(PivotModel model,
PivotRenderer renderer,
String dataFieldOrient,
boolean open,
String[] titles,
boolean useRendererForDataCells) |
static Exports.PivotExportContext |
getExportContext(Pivottable table,
boolean open,
String[] titles)
Return a context for exporting Pivottable information
|
static Exports.PivotExportContext |
getExportContext(Pivottable table,
boolean open,
String[] titles,
boolean useRendererForDataCells) |
public static final String DEFAULT_FORMAT
public static void exportExcel(OutputStream out, Exports.PivotExportContext context) throws IOException
out - the output stream to write tocontext - the export context created from Pivottable or modelIOExceptionpublic static void exportExcel(OutputStream out, String fileFormat, Exports.PivotExportContext context) throws IOException
Pivottable data.
Pivottable data.
out - the output stream to write tofileFormat - "xls", "xlsx", or "xlsx.static" supported.context - the export context created from Pivottable or modelIOExceptionpublic static void exportExcel(OutputStream out, org.zkoss.poi.ss.usermodel.Workbook book, Exports.PivotExportContext context) throws IOException
Note the XSSFWorkbook workbook create sheet with native Pivot Table (also contains a sheet with source data),
the HSSFWorkbook workbook create sheet with Pivottable data.
out - the output stream to write tobook - the workbook either HSSFWorkbook or XSSFWorkbook, if null will use HSSFWorkbook.context - the export context created from Pivottable or modelIOExceptionpublic static void exportExcel(OutputStream out, String fileFormat, Exports.PivotExportContext context, CellStyleConfigurator styleConfig) throws IOException
Pivottable data.
Pivottable data.
out - the output stream to write tofileFormat - "xls", "xlsx", or "xlsx.static" supported.context - the export context created from Pivottable or modelstyleConfig - configurator for excel cell styleIOExceptionpublic static void exportExcel(OutputStream out, org.zkoss.poi.ss.usermodel.Workbook book, Exports.PivotExportContext context, CellStyleConfigurator styleConfig) throws IOException
Note the XSSFWorkbook workbook create sheet with native Pivot Table (also contains a sheet with source data),
the HSSFWorkbook workbook create sheet with Pivottable data.
out - the output stream to write tobook - the workbook either HSSFWorkbook or XSSFWorkbook, if null will use HSSFWorkbook.context - the export context created from Pivottable or modelstyleConfig - configurator for excel cell styleIOExceptionpublic static void exportCSV(OutputStream out, Exports.PivotExportContext context) throws IOException
out - the output stream to write tocontext - the export context created from Pivottable or modelIOExceptionpublic static void exportCSV(OutputStream out, Exports.PivotExportContext context, String separator) throws IOException
out - the output stream to write tocontext - the export context created from Pivottable or modelseparator - the separator for marking cell boundary in CSV fileIOExceptionpublic static Exports.PivotExportContext getExportContext(Pivottable table, boolean open, String[] titles)
table - the Pivottable instanceopen - export as if all the header nodes were open (the model is not
affected)titles - title text for data, column, row title cells, respectively.
i.e. titles[0] will be rendered to the data title cell, titles[1] to the
column title cell, and titles[2] to the row title cell.public static Exports.PivotExportContext getExportContext(Pivottable table, boolean open, String[] titles, boolean useRendererForDataCells)
public static Exports.PivotExportContext getExportContext(PivotModel model, PivotRenderer renderer, String dataFieldOrient, boolean open, String[] titles)
model - the PivotModelrenderer - the PivotRendererdataFieldOrient - to arrange data fields on column or row, if there
are multiple data fields. Accepted values are "column" and "row".open - export as if all the header nodes were open (the model is not
affected)titles - title text for data, column, row title cells, respectively.
i.e. titles[0] will be rendered to the data title cell, titles[1] to the
column title cell, and titles[2] to the row title cell.public static Exports.PivotExportContext getExportContext(PivotModel model, PivotRenderer renderer, String dataFieldOrient, boolean open, String[] titles, boolean useRendererForDataCells)
Copyright © 2016. All rights reserved.