Created
April 14, 2011 12:20
-
-
Save xlson/919356 to your computer and use it in GitHub Desktop.
Example of using GroovyCSV 0.2 to parse csv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab('com.xlson.groovycsv:groovycsv:0.2') | |
import com.xlson.groovycsv.CsvParse | |
def csv = '''Name-Lastname | |
Mark-'Anderson-Nielsen' | |
Pete-Hansen''' | |
def data = new CsvParser().parse(csv, separator: '-', quoteChar: "'") | |
for(line in data) { | |
println "$line.Name $line.Lastname" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment