csv write - part-cw/lambdanative GitHub Wiki
(csv-write file output)
csv-write writes to a csv file the given output, which is a list of lists, by converting each list to a new line with the items in the list separated by commas.
Parameter | Description |
---|---|
file | The filename to which data are written |
output | The data (list of lists) to be written |
Example
Example 1: Write a few values to a file and read them back.
./DemoConsole
> (csv-write "test.csv" (list (list "Name" "Age" "Color") (list "John" 30 "red") (list "Mike" 20 "blue") (list "Paul" 25 "")))
> (csv-read "test.csv")
(("Name" "Age" "Color") ("John" "30" "red") ("Mike" "20" "blue") ("Paul" "25" ""))