Tablify
Tablify is a simple program I wrote to convert CSV files into various displayable formats. At the moment it supports four different output formats: HTML, tbl(1), as well as text art for ASCII and Unicode encodings.
Yes, I actually do enough with CSV files this is handy.
Usage
An example of each output method, given the following CSV file:
Name,Age,Favorite Language,Quote
Daniel Lyons,28,Haskell,"Try, try again"
Reid "The Man" Givens,29,CSS,"I am not a programmer"
$ tablify -H testdata.csv
| Name | Age | Favorite Language | Quote |
|---|---|---|---|
| Daniel Lyons | 28 | Haskell | Try, try again |
| Reid "The Man" Givens | 29 | CSS | I am not a programmer |

$ tablify -T testdata.csv
.TS
c c c c c
l l l l l.
Name Age Favorite Language Quote
Daniel Lyons 28 Haskell Try, try again
Reid "The Man" Givens 29 CSS I am not a programmer
.TE
Take a look at an already formatted TBL output rendered to PDF, which I rendered using this command:
tablify -T testdata.csv | tbl | groff -Tps | ps2pdf - > testdata.pdf
Keep in mind this is just a fragment like the HTML output mode, in this case intended to be spliced into a larger roff document.
Dependencies
- GHC
- utf8-string
Download
Get the software off the HackageDB: Tablify. I last updated this page when I released version 0.8, but there may be a newer one on Hackage by the time you‘re reading this.
License
This software is covered by the BSD license, which means you can basically do whatever you want with it.
Known Issues
Make sure your CSV file ends with a blank line or it will fail to parse.
Suggestions, Bug Fixes, Gripes
Please email me. You can find my email address in the package’s README.txt file or somewhere on this site.
I have taken some time and played around with ~5 MB CSV files and it hasn’t choked on them, but I haven’t bothered to try running it with anything larger than that.