CsvPivotTableUtils
to remove the dependency on POI jars@Deprecated public class CsvPivotTableUtils extends Object
CsvPivotTableUtils
is a class that has methods to export PivotTablePane's content to Character
Separated Values file format.
The export feature will not consider the cell contents conversion but you can use ValueConverter to format the
value if you want. It will also optionally consider table header as part of the export. You could also choose any
character including comma as the separator.
It does NOT support cell span and will LOSE the collapsed rows/columns because of the CSV format limitation.Constructor and Description |
---|
CsvPivotTableUtils()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
export(PivotTablePane pivotTablePane,
OutputStream out)
Deprecated.
Exports the pivotTablePane to as CSV file output steam.
|
static boolean |
export(PivotTablePane pivotTablePane,
OutputStream out,
HssfTableUtils.CellValueConverter cellValueConverter)
Deprecated.
Exports the pivotTablePane to as CSV file output steam.
|
static boolean |
export(PivotTablePane pivotTablePane,
OutputStream out,
HssfTableUtils.CellValueConverter cellValueConverter,
char separator)
Deprecated.
Exports the pivotTablePane to as CSV file output steam.
|
static boolean |
export(PivotTablePane pivotTablePane,
String fileName)
Deprecated.
Exports the pivotTablePane to an CSV file.
|
static boolean |
export(PivotTablePane pivotTablePane,
String fileName,
HssfTableUtils.CellValueConverter cellValueConverter)
Deprecated.
Exports the pivotTablePane to an CSV file.
|
static boolean |
export(PivotTablePane pivotTablePane,
String fileName,
HssfTableUtils.CellValueConverter cellValueConverter,
char separator)
Deprecated.
Exports the pivotTablePane to an CSV file.
|
public static boolean export(PivotTablePane pivotTablePane, String fileName) throws IOException
pivotTablePane
- the pivotTablePane to be exported.fileName
- the CSV file name. It should be the full path to the file.IOException
- if the write to the file failed.FileNotFoundException
- if the file exists but is a directory rather than a regular file, does not
exist but cannot be created, or cannot be opened for any other reasonpublic static boolean export(PivotTablePane pivotTablePane, String fileName, HssfTableUtils.CellValueConverter cellValueConverter) throws IOException
pivotTablePane
- the pivotTablePane to be exported.fileName
- the CSV file name. It should be the full path to the file.cellValueConverter
- the converter to convert cell value to the value that can be set to CSV cell.IOException
- if the write to the file failed.FileNotFoundException
- if the file exists but is a directory rather than a regular file, does not
exist but cannot be created, or cannot be opened for any other reasonpublic static boolean export(PivotTablePane pivotTablePane, String fileName, HssfTableUtils.CellValueConverter cellValueConverter, char separator) throws IOException
pivotTablePane
- the pivotTablePane to be exported.fileName
- the CSV file name. It should be the full path to the file.cellValueConverter
- the converter to convert cell value to the value that can be set to CSV cell.separator
- the character used to separate the cells. By default, it is a comma.IOException
- if the write to the file failed.FileNotFoundException
- if the file exists but is a directory rather than a regular file, does not
exist but cannot be created, or cannot be opened for any other reasonpublic static boolean export(PivotTablePane pivotTablePane, OutputStream out) throws IOException
pivotTablePane
- the pivotTablePane to be exported.out
- the output streamIOException
- if the write to the file failed.FileNotFoundException
- if the file exists but is a directory rather than a regular file, does not
exist but cannot be created, or cannot be opened for any other reasonpublic static boolean export(PivotTablePane pivotTablePane, OutputStream out, HssfTableUtils.CellValueConverter cellValueConverter) throws IOException
pivotTablePane
- the pivotTablePane to be exported.out
- the output streamcellValueConverter
- the converter to convert cell value to the value that can be set to CSV cell.IOException
- if the write to the file failed.FileNotFoundException
- if the file exists but is a directory rather than a regular file, does not
exist but cannot be created, or cannot be opened for any other reasonpublic static boolean export(PivotTablePane pivotTablePane, OutputStream out, HssfTableUtils.CellValueConverter cellValueConverter, char separator) throws IOException
pivotTablePane
- the pivotTablePane to be exported.out
- the output streamcellValueConverter
- the converter to convert cell value to the value that can be set to CSV cell.separator
- the character used to separate the cells. By default, it is a comma.IOException
- if the write to the file failed.FileNotFoundException
- if the file exists but is a directory rather than a regular file, does not
exist but cannot be created, or cannot be opened for any other reason