Skip to content

Overview

Development

Overview

IDEs

API Explorer

CsvMethods

The CsvMethods class contains one-liner methods for reading CSV files.

Not for Gloop

The CsvMethods class is intended for use in Groovy. Gloop already has flat file descriptors, allowing users to read and write flat files (which includes CSV files) natively in Gloop.

Here's a short Groovy snippet using one of the methods in the CsvMethods class:

1
2
3
4
5
6
File movies = new File( '/path/to/movies.csv' )
movies.eachRecord () { // For every record
    for ( def i = 0; i < it.size(); i++ )
        print it[itr] + ' ' // Print each column
    println '' // Print a new line in between records
}