Read and write spreadsheets from and to CSV files in a lazy way http://www.haskell.org/haskellwiki/Spreadsheet

Latest on Hackage:

See all snapshots spreadsheet appears in

BSD-3-Clause licensed and maintained by Henning Thielemann

Module documentation for

This version can be pinned in stack with:[email protected]:9a3e3675802d5fd772df5fdc124c8d12098e54a1d9638b43479720417753259e,2771

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


and names.csv with content


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.