toolbox.file
Class Excel2CSVUtil
java.lang.Object
toolbox.file.Excel2CSVUtil
public class Excel2CSVUtil
- extends java.lang.Object
A convenience class to convert an Excel work book into a CSV string(s).
This class requires the JExcelAPI. The API can be
downloaded from http://jexcelapi.sourceforge.net/.
Method Summary |
void |
convert(java.lang.String wbFile,
java.lang.String csvFile,
java.lang.String enc,
int sheet,
boolean hide)
Convert the given Excel work book into a CSV string(s). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Excel2CSVUtil
public Excel2CSVUtil()
- Default constructor.
convert
public void convert(java.lang.String wbFile,
java.lang.String csvFile,
java.lang.String enc,
int sheet,
boolean hide)
throws java.lang.Exception
- Convert the given Excel work book into a CSV string(s).
- Parameters:
wbFile
- String containing the file name of the Excel workbook.csvFile
- String containing the name of the target csv file.enc
- Strinng containing the target encoding.sheet
- Index of the sheet to parse. -1 indicates all sheets.hide
- Boolean indicating whether to suppress hidden cells.
- Throws:
java.io.IOException
- if the workbook or target file cannot be accessed.
java.lang.Exception