|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.zkoss.pivot.util.Exports
public class Exports
Utility class for PivotTable Exporter
Nested Class Summary | |
---|---|
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 |
Constructor Summary | |
---|---|
Exports()
|
Method Summary | |
---|---|
static void |
exportCSV(java.io.OutputStream out,
Exports.PivotExportContext context)
Export Pivottable to CSV format, with comma as separator |
static void |
exportCSV(java.io.OutputStream out,
Exports.PivotExportContext context,
java.lang.String separator)
Export Pivottable to CSV format. |
static void |
exportExcel(java.io.OutputStream out,
java.lang.String fileFormat,
Exports.PivotExportContext context)
Export Pivottable to excel format. |
static void |
exportExcel(java.io.OutputStream out,
java.lang.String fileFormat,
Exports.PivotExportContext context,
CellStyleConfigurator styleConfig)
Export Pivottable to excel format. |
static Exports.PivotExportContext |
getExportContext(PivotModel model,
PivotRenderer renderer,
java.lang.String dataFieldOrient,
boolean open,
java.lang.String[] titles)
Return a context for exporting Pivottable information |
static Exports.PivotExportContext |
getExportContext(Pivottable table,
boolean open,
java.lang.String[] titles)
Return a context for exporting Pivottable information |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Exports()
Method Detail |
---|
public static void exportExcel(java.io.OutputStream out, java.lang.String fileFormat, Exports.PivotExportContext context) throws java.io.IOException
out
- the output stream to write tofileFormat
- currently only "xls" is supported.context
- the export context created from Pivottable or model
java.io.IOException
public static void exportExcel(java.io.OutputStream out, java.lang.String fileFormat, Exports.PivotExportContext context, CellStyleConfigurator styleConfig) throws java.io.IOException
Note the "xlsx" format create sheet with native Pivot Table (also contains a sheet with source data),
the "xls" formate create sheet with Pivottable
data.
out
- the output stream to write tofileFormat
- "xls" or "xlsx" supported.context
- the export context created from Pivottable or modelstyleConfig
- configurator for excel cell style
java.io.IOException
public static void exportCSV(java.io.OutputStream out, Exports.PivotExportContext context) throws java.io.IOException
out
- the output stream to write tocontext
- the export context created from Pivottable or model
java.io.IOException
public static void exportCSV(java.io.OutputStream out, Exports.PivotExportContext context, java.lang.String separator) throws java.io.IOException
out
- the output stream to write tocontext
- the export context created from Pivottable or modelseparator
- the separator for marking cell boundary in CSV file
java.io.IOException
public static Exports.PivotExportContext getExportContext(Pivottable table, boolean open, java.lang.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(PivotModel model, PivotRenderer renderer, java.lang.String dataFieldOrient, boolean open, java.lang.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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |