Here’s a useful class that reads a CSV file and returns each row of values. Its based on some regular expressions I found on the net (unfortunately URL got lost, but its a fairly straightforward one to fine). Call back functions to make it a convenient way to read the input CSV file.

// create the object with the input path
def csv = new CsvFileReader(inputFilePath))
// define a closure that handles each row of data
// returned as a map of column name (defined by header row)
csv.forEachRow () {
print (it['ColumnName']) }