org.tbee.csv
Class CSVUtil

java.lang.Object
  extended by org.tbee.csv.CSVUtil

public class CSVUtil
extends Object


Field Summary
static String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
 
Constructor Summary
CSVUtil()
           
 
Method Summary
static void splitCSVFileOnColumns(File file, int postfixLength, char fieldSeparator, int maxColumnCount)
          Read a CSV file and write it to multiple files with each file having a maximum number of columns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCECODE_VERSION

public static final String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values
Constructor Detail

CSVUtil

public CSVUtil()
Method Detail

splitCSVFileOnColumns

public static void splitCSVFileOnColumns(File file,
                                         int postfixLength,
                                         char fieldSeparator,
                                         int maxColumnCount)
                                  throws FileNotFoundException,
                                         IOException
Read a CSV file and write it to multiple files with each file having a maximum number of columns. This function is especially handy for Excel which has a maximum of 256 columns. A file "test.csv" with 600 column can so easily be split into three files (test.0.csv, test.1.csv, test.2.csv with 250, 250 and 100 columns) Comments and empty lines are removed.

Parameters:
file -
postfixLength -
fieldSeparator -
maxColumnCount -
Throws:
FileNotFoundException
IOException


Copyright © 2011 KnowledgePlaza. All Rights Reserved.