JIDE 3.5.15

com.jidesoft.hssf
Class CsvTableScrollPaneUtils

java.lang.Object
  extended by com.jidesoft.hssf.CsvTableScrollPaneUtils

Deprecated. replaced by CsvTableScrollPaneUtils to remove the dependency on POI jars

@Deprecated
public class CsvTableScrollPaneUtils
extends Object

CsvTableScrollPaneUtils is a class that has methods to export TableScrollPane'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 in TreeTable scenario because of the CSV format limitation.


Constructor Summary
CsvTableScrollPaneUtils()
          Deprecated.  
 
Method Summary
static boolean export(TableScrollPane scrollPane, int firstRow, int firstColumn, int numberOfRows, int numberOfColumns, String fileName, boolean includeTableHeader, HssfTableUtils.CellValueConverter cellValueConverter, StringConverter columnNameConverter)
          Deprecated. Exports the scrollPane to an CSV file.
static boolean export(TableScrollPane scrollPane, int firstRow, int firstColumn, int numberOfRows, int numberOfColumns, String fileName, boolean includeTableHeader, HssfTableUtils.CellValueConverter cellValueConverter, StringConverter columnNameConverter, char separator)
          Deprecated. Exports the scrollPane to an CSV file.
static boolean export(TableScrollPane scrollPane, OutputStream out)
          Deprecated. Exports the scrollPane to as CSV file output steam.
static boolean export(TableScrollPane scrollPane, OutputStream out, boolean includeTableHeader)
          Deprecated. Exports the scrollPane to as CSV file output steam.
static boolean export(TableScrollPane scrollPane, OutputStream out, boolean includeTableHeader, HssfTableUtils.CellValueConverter cellValueConverter)
          Deprecated. Exports the scrollPane to as CSV file output steam.
static boolean export(TableScrollPane scrollPane, OutputStream out, boolean includeTableHeader, HssfTableUtils.CellValueConverter cellValueConverter, StringConverter columnNameConverter)
          Deprecated. Exports the scrollPane to as CSV file output steam.
static boolean export(TableScrollPane scrollPane, OutputStream out, int firstRow, int firstColumn, int numberOfRows, int numberOfColumns, boolean includeTableHeader, HssfTableUtils.CellValueConverter cellValueConverter, StringConverter columnNameConverter)
          Deprecated. Exports the scrollPane to as CSV file output steam.
static boolean export(TableScrollPane scrollPane, OutputStream out, int firstRow, int firstColumn, int numberOfRows, int numberOfColumns, boolean includeTableHeader, HssfTableUtils.CellValueConverter cellValueConverter, StringConverter columnNameConverter, char separator)
          Deprecated. Exports the scrollPane to as CSV file output steam.
static boolean export(TableScrollPane scrollPane, String fileName)
          Deprecated. Exports the TableScrollPane to an CSV file.
static boolean export(TableScrollPane scrollPane, String fileName, boolean includeTableHeader)
          Deprecated. Exports the scrollPane to an CSV file.
static boolean export(TableScrollPane scrollPane, String fileName, boolean includeTableHeader, HssfTableUtils.CellValueConverter cellValueConverter)
          Deprecated. Exports the scrollPane to an CSV file.
static boolean export(TableScrollPane scrollPane, String fileName, boolean includeTableHeader, HssfTableUtils.CellValueConverter cellValueConverter, StringConverter columnNameConverter)
          Deprecated. Exports the scrollPane to an CSV file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsvTableScrollPaneUtils

public CsvTableScrollPaneUtils()
Deprecated. 
Method Detail

export

public static boolean export(TableScrollPane scrollPane,
                             String fileName)
                      throws IOException
Deprecated. 
Exports the TableScrollPane to an CSV file.

Parameters:
scrollPane - the scrollPane to be exported.
fileName - the CSV file name. It should be the full path to the file.
Returns:
true if exporting succeed. If poi.jar is not in the classpath, false will be returned. Exception will be thrown if there is error during the exporting.
Throws:
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

export

public static boolean export(TableScrollPane scrollPane,
                             String fileName,
                             boolean includeTableHeader)
                      throws IOException
Deprecated. 
Exports the scrollPane to an CSV file.

Parameters:
scrollPane - the scrollPane to be exported.
fileName - the CSV file name. It should be the full path to the file.
includeTableHeader - whether to include the scrollPane header.
Returns:
true if exporting succeed. If poi.jar is not in the classpath, false will be returned. Exception will be thrown if there is error during the exporting.
Throws:
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

export

public static boolean export(TableScrollPane scrollPane,
                             String fileName,
                             boolean includeTableHeader,
                             HssfTableUtils.CellValueConverter cellValueConverter)
                      throws IOException
Deprecated. 
Exports the scrollPane to an CSV file.

Parameters:
scrollPane - the scrollPane to be exported.
fileName - the CSV file name. It should be the full path to the file.
includeTableHeader - whether to include the scrollPane header.
cellValueConverter - the converter to convert cell value to the value that can be set to CSV cell.
Returns:
true if exporting succeed. If poi.jar is not in the classpath, false will be returned. Exception will be thrown if there is error during the exporting.
Throws:
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

export

public static boolean export(TableScrollPane scrollPane,
                             String fileName,
                             boolean includeTableHeader,
                             HssfTableUtils.CellValueConverter cellValueConverter,
                             StringConverter columnNameConverter)
                      throws IOException
Deprecated. 
Exports the scrollPane to an CSV file.

Parameters:
scrollPane - the scrollPane to be exported.
fileName - the CSV file name. It should be the full path to the file.
includeTableHeader - whether to include the scrollPane header.
cellValueConverter - the converter to convert cell value to the value that can be set to CSV cell.
columnNameConverter - the converter to convert the column name.
Returns:
true if exporting succeed. If poi.jar is not in the classpath, false will be returned. Exception will be thrown if there is error during the exporting.
Throws:
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

export

public static boolean export(TableScrollPane scrollPane,
                             int firstRow,
                             int firstColumn,
                             int numberOfRows,
                             int numberOfColumns,
                             String fileName,
                             boolean includeTableHeader,
                             HssfTableUtils.CellValueConverter cellValueConverter,
                             StringConverter columnNameConverter)
                      throws IOException
Deprecated. 
Exports the scrollPane to an CSV file.

Parameters:
scrollPane - the scrollPane to be exported.
firstRow - the first row to be exported
firstColumn - the first row to be exported
numberOfRows - number of rows to be exported, -1 means all rows.
numberOfColumns - number of columns to be exported. -1 means all columns.
fileName - the CSV file name. It should be the full path to the file.
includeTableHeader - whether to include the scrollPane header.
cellValueConverter - the converter to convert cell value to the value that can be set to CSV cell.
columnNameConverter - the converter to convert the column name.
Returns:
true if exporting succeed. If poi.jar is not in the classpath, false will be returned. Exception will be thrown if there is error during the exporting.
Throws:
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

export

public static boolean export(TableScrollPane scrollPane,
                             int firstRow,
                             int firstColumn,
                             int numberOfRows,
                             int numberOfColumns,
                             String fileName,
                             boolean includeTableHeader,
                             HssfTableUtils.CellValueConverter cellValueConverter,
                             StringConverter columnNameConverter,
                             char separator)
                      throws IOException
Deprecated. 
Exports the scrollPane to an CSV file.

Parameters:
scrollPane - the scrollPane to be exported.
firstRow - the first row to be exported
firstColumn - the first row to be exported
numberOfRows - number of rows to be exported, -1 means all rows.
numberOfColumns - number of columns to be exported. -1 means all columns.
fileName - the CSV file name. It should be the full path to the file.
includeTableHeader - whether to include the scrollPane header.
cellValueConverter - the converter to convert cell value to the value that can be set to CSV cell.
columnNameConverter - the converter to convert the column name.
separator - the character used to separate the cells. By default, it is a comma.
Returns:
true if exporting succeed. If poi.jar is not in the classpath, false will be returned. Exception will be thrown if there is error during the exporting.
Throws:
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

export

public static boolean export(TableScrollPane scrollPane,
                             OutputStream out)
                      throws IOException
Deprecated. 
Exports the scrollPane to as CSV file output steam.

Parameters:
scrollPane - the scrollPane to be exported.
out - the output stream
Returns:
true if exporting succeed. If poi.jar is not in the classpath, false will be returned. Exception will be thrown if there is error during the exporting.
Throws:
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

export

public static boolean export(TableScrollPane scrollPane,
                             OutputStream out,
                             boolean includeTableHeader)
                      throws IOException
Deprecated. 
Exports the scrollPane to as CSV file output steam.

Parameters:
scrollPane - the scrollPane to be exported.
out - the output stream
includeTableHeader - whether to include the scrollPane header.
Returns:
true if exporting succeed. If poi.jar is not in the classpath, false will be returned. Exception will be thrown if there is error during the exporting.
Throws:
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

export

public static boolean export(TableScrollPane scrollPane,
                             OutputStream out,
                             boolean includeTableHeader,
                             HssfTableUtils.CellValueConverter cellValueConverter)
                      throws IOException
Deprecated. 
Exports the scrollPane to as CSV file output steam.

Parameters:
scrollPane - the scrollPane to be exported.
out - the output stream
includeTableHeader - whether to include the scrollPane header.
cellValueConverter - the converter to convert cell value to the value that can be set to CSV cell.
Returns:
true if exporting succeed. If poi.jar is not in the classpath, false will be returned. Exception will be thrown if there is error during the exporting.
Throws:
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

export

public static boolean export(TableScrollPane scrollPane,
                             OutputStream out,
                             boolean includeTableHeader,
                             HssfTableUtils.CellValueConverter cellValueConverter,
                             StringConverter columnNameConverter)
                      throws IOException
Deprecated. 
Exports the scrollPane to as CSV file output steam.

Parameters:
scrollPane - the scrollPane to be exported.
out - the output stream
includeTableHeader - whether to include the scrollPane header.
cellValueConverter - the converter to convert cell value to the value that can be set to CSV cell.
columnNameConverter - the converter to convert the column name.
Returns:
true if exporting succeed. If poi.jar is not in the classpath, false will be returned. Exception will be thrown if there is error during the exporting.
Throws:
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

export

public static boolean export(TableScrollPane scrollPane,
                             OutputStream out,
                             int firstRow,
                             int firstColumn,
                             int numberOfRows,
                             int numberOfColumns,
                             boolean includeTableHeader,
                             HssfTableUtils.CellValueConverter cellValueConverter,
                             StringConverter columnNameConverter)
                      throws IOException
Deprecated. 
Exports the scrollPane to as CSV file output steam.

Parameters:
scrollPane - the scrollPane to be exported.
out - the output stream
firstRow - the first row to be exported
firstColumn - the first row to be exported
numberOfRows - number of rows to be exported, -1 means all rows.
numberOfColumns - number of columns to be exported. -1 means all columns.
includeTableHeader - whether to include the scrollPane header.
cellValueConverter - the converter to convert cell value to the value that can be set to CSV cell.
columnNameConverter - the converter to convert the column name.
Returns:
true if exporting succeed. If poi.jar is not in the classpath, false will be returned. Exception will be thrown if there is error during the exporting.
Throws:
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

export

public static boolean export(TableScrollPane scrollPane,
                             OutputStream out,
                             int firstRow,
                             int firstColumn,
                             int numberOfRows,
                             int numberOfColumns,
                             boolean includeTableHeader,
                             HssfTableUtils.CellValueConverter cellValueConverter,
                             StringConverter columnNameConverter,
                             char separator)
                      throws IOException
Deprecated. 
Exports the scrollPane to as CSV file output steam.

Parameters:
scrollPane - the scrollPane to be exported.
out - the output stream
firstRow - the first row to be exported
firstColumn - the first row to be exported
numberOfRows - number of rows to be exported, -1 means all rows.
numberOfColumns - number of columns to be exported. -1 means all columns.
includeTableHeader - whether to include the scrollPane header.
cellValueConverter - the converter to convert cell value to the value that can be set to CSV cell.
columnNameConverter - the converter to convert the column name.
separator - the character used to separate the cells. By default, it is a comma.
Returns:
true if exporting succeed. If poi.jar is not in the classpath, false will be returned. Exception will be thrown if there is error during the exporting.
Throws:
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

JIDE 3.5.15