clojure-csv library write-csv examples

712 views
Skip to first unread message

octopusgrabbus

unread,
Jun 15, 2012, 9:57:03 AM6/15/12
to clo...@googlegroups.com
I would appreciate getting a pointer to some clojure-csv library write-csv examples.

Thank you.

octopusgrabbus

unread,
Jun 15, 2012, 10:01:24 AM6/15/12
to clo...@googlegroups.com
The reason why I asked this question is this code looks like it's using another csv library, so I'm confused.

(require '[clojure.data.csv :as csv]
         '[clojure.java.io :as io])

(with-open [in-file (io/reader "in-file.csv")]
  (doall
    (csv/read-csv in-file)))

(with-open [out-file (io/writer "out-file.csv")]
  (csv/write-csv out-file
                 [["abc" "def"]
                  ["ghi" "jkl"]]))

Walter Tetzner

unread,
Jun 15, 2012, 10:30:04 AM6/15/12
to clo...@googlegroups.com
On Friday, June 15, 2012 10:01:24 AM UTC-4, octopusgrabbus wrote:
The reason why I asked this question is this code looks like it's using another csv library, so I'm confused.

That's because it is using another csv library: https://github.com/clojure/data.csv.

clojure-csv: https://github.com/davidsantiago/clojure-csv

octopusgrabbus

unread,
Jun 16, 2012, 11:31:16 AM6/16/12
to clo...@googlegroups.com
Thank you. That clears things up quite a bit, when you said another library.
Reply all
Reply to author
Forward
0 new messages