The spreadsheet package
Read and write spreadsheets from and to files containing comma separated values (CSV) in a lazy way. See also the csv package http://hackage.haskell.org/package/csv and http://www.xoltar.org/languages/haskell.html, http://www.xoltar.org/languages/haskell/CSV.hs. Both do not parse lazy. Reading from other source than plain Strings could be easily added.
If you install this package by
cabal install -fbuildExamples
then an example program is compiled and installed, too. This program fills a template text using data from a CSV file. E.g. given a file template.txt with content
Name: FIRSTNAME SURNAME Born: BIRTH
and names.csv with content
"FIRSTNAME","SURNAME",BIRTH "Georg","Cantor",1845 "Haskell","Curry",1900 "Ada","Lovelace",1815
the call
csvreplace template.txt <names.csv
produces the output
Name: Georg Cantor Born: 1845 Name: Haskell Curry Born: 1900 Name: Ada Lovelace Born: 1815
You may also generate one file per CSV row in the following manner:
csvreplace --multifile=FIRSTNAME-SURNAME.txt template.txt <names.csv
For similar (non-Haskell) programs see cut, csvfix, csvtool.
Properties
| Versions | 0.1, 0.1.1, 0.1.1.1, 0.1.2, 0.1.2.1, 0.1.3, 0.1.3.1, 0.1.3.2 |
|---|---|
| Dependencies | base (≥1.0 & <2), explicit-exception (0.1.*), transformers (≥0.2 & <0.4), utility-ht (≥0.0.2 & <0.1) or base (≥2 & <5), explicit-exception (0.1.*), transformers (≥0.2 & <0.4), utility-ht (≥0.0.2 & <0.1) |
| License | BSD3 |
| Author | Henning Thielemann <haskell@henning-thielemann.de> |
| Maintainer | Henning Thielemann <haskell@henning-thielemann.de> |
| Category | Data, Text |
| Home page | http://www.haskell.org/haskellwiki/Spreadsheet |
| Source repository | darcs get http://code.haskell.org/~thielema/spreadsheet/ |
| Executables | csvreplace |
| Upload date | Mon Jul 16 14:53:46 UTC 2012 |
| Uploaded by | HenningThielemann |
| Built on | ghc-7.4 |
Modules
- Data
Downloads
- spreadsheet-0.1.3.2.tar.gz (Cabal source package)
- package description (included in the package)