Ricebridge
Search This Site
May 20 2013 12:21 UTC


$15 Gift Certificate for every bug you find.

MaxMind GeoIP
This IP address to country database is provided as a CSV file that can easily be read by CSV Manager.

Got a question for us?
Just Ask!

Bookmark Ricebridge Java Components - user friendly and well documented at del.icio.us Digg Ricebridge Java Components - user friendly and well documented at Digg.com Bookmark Ricebridge Java Components - user friendly and well documented at reddit.com Bookmark Ricebridge Java Components - user friendly and well documented at YahooMyWeb Bookmark Ricebridge Java Components - user friendly and well documented at Spurl.net Bookmark Ricebridge Java Components - user friendly and well documented at Simpy.com Bookmark Polyphasic Mutants at NewsVine Blink this Ricebridge Java Components - user friendly and well documented at blinklist.com Bookmark Ricebridge Java Components - user friendly and well documented at Furl.net Fark Ricebridge Java Components - user friendly and well documented at Fark.com

Reference

CSV Manager provides a number of settings that control the parsing and generation of CSV format files. For a full list of these settings, see:

  •   Settings for loading CSV data.
  •   Settings for saving CSV data.

CSV Manager also provides statistics and error reporting.

Since there is no formal specification defining the CSV format, the following grammar is a summary definition based on the actual parser used by Ricebridge CSV Manager:

CSV Grammar

TABLE:    LINE*;
LINE:     SEP* FIELD? ( SEP FIELD? )* SEP* ( EOL | EOF ) 
SEP:      [sep]+
FIELD:    [trim]? ( UNQUOTED | QUOTED ) [trim]? 
UNQUOTED: ( [data]* | ESCAPE )*;
QUOTED:   [quote] ( DOUBLE | ESCAPE | [data]* )* [quote]
DOUBLE:   [quote] [quote]
ESCAPE:   [esc] [code]
EOL:      [eol]+
EOF:      [eof]

The following abbreviations are used:

  [data]:  any data character
  [eof]:  end-of-file indicator
  [eol]:  end-of-line characters
  [esc]:  escape character
  [quote]:  quote character
  [sep]:  any separator character
  [trim]:  any trim character
Note that some elements of the grammar may be absent depending on the settings. For example, if you turn off quotes with CsvSpec.setUseQuote(false), then there are no QUOTED fields to deal with.




Settings for Loading CSV Data

[top]

Setting Default Methods Related Description
allow quoted line ends  true  setAllowQuotedLineEnds(boolean) 
getAllowQuotedLineEnds() 
Allow quoted fields to contain end of line characters (WARNING: read API documentation before changing).
close inputstream  true  setCloseInputStream(boolean) 
getCloseInputStream() 
Close the InputStream after reading the CSV data.
collect bad lines  true  setCollectBadLines(boolean) 
getCollectBadLines() 
ignore bad lines 
Collect BadLine objects for later inspection.
data field max length  0  setDataFieldMaxLength(int) 
getDataFieldMaxLength() 
Set the maximum allowed character length of data fields (use zero for no limit).
end line  n/a  setEndLine(long) 
getEndLine() 
start line 
num lines 
Line number to finish loading data at.
end of line  \r\n  setEndOfLine(String) 
getEndOfLine() 
merge separators 
quote 
End-of-line characters.
escape  \  setEscape(char) 
getEscape() 
use escape 
escape map 
Escape character.
escape map  \r\n\t\b  setEscapeMap(HashMap) 
getEscapeMap() 
escape 
Map escape code characters to actual characters.
ignore bad lines  false  setIgnoreBadLines(boolean) 
getIgnoreBadLines() 
ignore empty lines 
collect bad lines 
Ignore lines with syntax errors.
ignore empty lines  false  setIgnoreEmptyLines(boolean) 
getIgnoreEmptyLines() 
ignore bad lines 
Ignore lines with syntax errors.
merge separators  false  setMergeSeparators(boolean) 
getMergeSeparators() 
separator 
Treat adjacent separator characters as one.
num fields  0+  setNumFields(int) 
getNumFields() 
separator 
Expected number of data fields per line.
num lines  n/a  setNumLines(long) 
getNumLines() 
start line 
end line 
The number of lines to load.
quote  "  setQuote(String) 
getQuote() 
use quote 
separator 
Data field quote character.
separator  ,  setSeparator(String) 
getSeparator() 
merge separators 
quote 
Data field separator characters.
start line  1  setStartLine(long) 
getStartLine() 
end line 
num lines 
Line number to start loading data from.
trim  space, tab  setTrim(java.lang.String) 
getTrim() 
trim 
Whitespace characters to trim.
trim type  TrimType.Full  setTrimType(TrimType) 
getTrimType() 
trim 
Type of whitespace trimming to use.
use escape  true  setUseEscape(boolean) 
getUseEscape() 
escape 
Enable use of escape character.
use escape map  false  setUseEscapeMap(boolean) 
getUseEscapeMap() 
escape map 
escape 
Enable use of escape code character mappings.
use quote  true  setUseQuote(boolean) 
getUseQuote() 
quote 
Enable use of quote character.
verbatim end line  false  setVerbatimEndOfLine(boolean) 
getVerbatimEndOfLine() 
Output the end-of-line characters exactly as specified.



Settings for Saving CSV Data

[top]

Setting Default Methods Related Description
close outputstream  true  setCloseOutputStream(boolean) 
getCloseOutputStream() 
flush each line 
Close the OutputStream after reading the CSV data.
end line  n/a  setEndLine(long) 
getEndLine() 
start line 
num lines 
Line number to finish loading data at.
end of line  \r\n  setEndOfLine(String) 
getEndOfLine() 
quote 
End-of-line characters.
escape  \  setEscape(char) 
getEscape() 
use escape 
escape map 
Escape character.
escape map  \r\n\t\b  setEscapeMap(HashMap) 
getEscapeMap() 
escape 
Map escape code characters to actual characters.
flush each line  false  setFlushEachLine(boolean) 
getFlushEachLine() 
close outputstream 
Flush the OutputStream after each line of CSV data.
num lines  n/a  setNumLines(long) 
getNumLines() 
start line 
end line 
The number of lines to load.
quote  "  setQuote(String) 
getQuote() 
use quote 
separator 
Data field quote character.
type quote  QuoteType.AsNeeded  setQuoteType(QuoteType) 
getQuoteType() 
quote 
Quote fields as needed, or always.
separator  ,  setSeparator(String) 
getSeparator() 
quote 
Data field separator characters.
start line  1  setStartLine(long) 
getStartLine() 
end line 
num lines 
Line number to start loading data from.
use escape  true  setUseEscape(boolean) 
getUseEscape() 
escape 
Enable use of escape character.
use escape map  false  setUseEscapeMap(boolean) 
getUseEscapeMap() 
escape map 
escape 
Enable use of escape code character mappings.
use quote  true  setUseQuote(boolean) 
getUseQuote() 
quote 
Enable use of quote character.



Statistics

[top]

Setting Methods Related Description
average time / line  getAverageTimePerLineInSeconds() 
total time 
Average time per line in seconds.
bad line count  getBadLineCount() 
line count 
Final bad line count (current if running in background).
bad line list  getBadLines() 
error list 
List of badly formatted lines.
ending time  getEndDate() 
starting time 
Ending time point.
error list  getErrors() 
bad line list 
List of error messages.
line count  getLineCount() 
bad line count 
Final line count (current if running in background).
starting time  getStartDate() 
ending time 
Starting time point.
processing status  isFinished() 
True when processing has finished.
total time  getTimeTaken() 
total time / seconds 
average time / line 
Total time in milliseconds.
total time / seconds  getTimeTakenInSeconds() 
total time 
average time / line 
Total time in seconds.




Why bother hand-coding yet another CSV parser? Let us deal with the bugs. We make it simple and easy to focus on the real work; delivering your project on time.

Try the Online Demo Download Now for $170.00 More Licensing options Why should I buy this component?

If you need a site license, you can also download CSV Manager for $970.00 If you are a registered charity, academic institution, non-profit or government body, we can provide CSV Manager at zero cost.

How does CSV Manager load your data? We provide five options:

Need to load your data into a different data structure? Please tell us!

FREE Email Support

All CSV Manager licenses include a FREE 6 month Email Support Package, worth $1500.00.

Email Support Package

FREE XML Manager

All CSV Manager licenses include a FREE XML Manager single developer license, worth $170.00.

Convert CSV to XML

Any CSV Format

The CSV Manager component can handle any style of tabular text data, from Excel CSV files to the UNIX passwd file.

CSV Formats

"Your product actually did help a lot! I was able to accelerate my development time quite a bit and your service support was also real nice."
Luis Garcia,
Independent Contractor
"An event-based CSV parser is so much more flexible and elegant than the free alternatives that I found. We use it for applications which require a mixture of XML and CSV data. This requires a parser that performs well, uses memory efficiently, simplifies data access and accurately formats output data. We found the Ricebridge parser easy to work with, conspicuously well documented and capable of handling large (500kb+) files. That's a big thumbs up from all the Gaisan team."
Shane Dempsey,
Gaisan
"I would have spent all day trying to read CSV fields that contained commas. I bought your software about 15 minutes ago and my problem is ALREADY solved. Thank you very, very much for a quality piece of software."
Adrian Klingel,
Illumaware
"Ricebridge CSV Manager was really easy to integrate into our existing system, and has been completely reliable for data transfer, not to mention a big time saver!"
Fred Crowe, Speech-Writers
comment on this page Home | Search | About Us | Contact Us | Our Products | Documentation | Resources | Login
Copyright © 2004-2013 Ricebridge. All Rights Reserved.