Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: data.csv-0.1.0
Fetching contributors…

Cannot retrieve contributors at this time

53 lines (35 sloc) 1.24 kB

data.csv

data.csv is a Clojure library for reading and writing comma separated value (csv) files. It is licensed under the Eclipse open source license. The library has been tested on Clojure versions 1.2, 1.2.1 and 1.3-beta1.

Installation

Using maven

Add

<dependency>
  <groupId>org.clojure</groupId>
  <artifactId>data.csv</artifactId>
  <version>0.1.0</version>
</dependency>

to your pom.xml file.

Using leiningen

Add [org.clojure/data.csv "0.1.0"] as a dependency to your project.clj.

Usage

(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"]]))

Features

Reading

data.csv supports RFC 4180. Additionally, it is possible to choose separator and quote characters. Reading is fast and lazy. See (doc read-csv) for available options.

Writing

See (doc write-csv) for available options.

Jump to Line
Something went wrong with that request. Please try again.