Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Clojure library for reading and writing comma separated value files
Clojure
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
pom.xml
project.clj

README.md

cljcsv

Note: cljcsv is no longer maintained as it has moved to Clojure Contrib as data.csv.

Cljcsv 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 version 1.2, 1.2.1 and 1.3-beta1.

If you find bugs or has a feature request please open a ticket on the github issue tracker.

Installation

Using maven

Add

<dependency>
  <groupId>cljcsv</groupId>
  <artifactId>cljcsv</artifactId>
  <version>1.3.1</version>
</dependency>

to your pom.xml file.

Using leiningen

Add [cljcsv "1.3.1"] as a dependency to your project.clj.

Usage

(use '(com.github.jonase.csv)
     '(clojure.java.io))

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

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

See also this introduction

Features

Reading

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

Writing

See (doc write-csv) for available options.

Something went wrong with that request. Please try again.