/ Published in: Groovy
Format a list of lists to CSV format
Expand |
Embed | Plain Text
class CsvFormat { result = result[0..-2] result += '\n' } result } } } }
Comments
Subscribe to comments
You need to login to post a comment.
roock on 02/18/08
1 person have marked this snippet as a favorite
Format a list of lists to CSV format
class CsvFormat { result = result[0..-2] result += '\n' } result } } } }
Subscribe to comments
You need to login to post a comment.
better:
`class CsvFormat {
sigh... learning markdown. Anyway, this is faster for larger datasets
class CsvFormat { def convertListToCsv(list) { def result = new StringBuilder() list.each{row -> result
fucking markdown :-P