Skip to content

Instantly share code, notes, and snippets.

@fumokmm
Created November 29, 2010 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fumokmm/720171 to your computer and use it in GitHub Desktop.
Save fumokmm/720171 to your computer and use it in GitHub Desktop.
// see. http://xlson.com/
// https://github.com/xlson/groovycsv
@Grab('com.xlson.groovycsv:groovycsv:0.2')
import com.xlson.groovycsv.CsvParser
def csv = new File('test.csv').text
def data = new CsvParser().parse(csv, separator: ',', quoteChar: '"')
data.each {
println "$it.no : $it.comment"
}
no name comment
1 テスト1 改行 含み
2 test2 カンマ,含み
3 てすと3 ダブルクォーテーション"含み
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment