Roland's homepage

My random knot in the Web

csv2tbl

The csv2tbl.py script takes a comma-separated values ("csv") file, and converts it to a LaTeX table. It handles a couple of different possible seperators; semicolon, comma and tab. Of those it automatically pics the one that occurs most.

N.B.: it does not try to interpret quotation marks!

It uses the booktabs package for a more typgraphically neat look of the generated table. To use these generated tables in yout LaTeX document, put the following in its preamble:

\usepackage{booktabs}

And then incorporate the generated table (assuming you've saved it as the file csvtable.tex) in your document:

\input{csvtable}

N.B.: You should generally not use \include here instead of \input here. It forces page breaks around the incorporated text, among other things.

source:csv2tbl.py
GPG signature:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEABECAAYFAlCNWycACgkQEnfvsMMhpyVb7wCbB2DptA0bRFl+yziS1eVndCgN
i0kAoJO9Ko62LSHSFgTY3VLAa4IkVV5F
=+oN6
-----END PGP SIGNATURE-----
SHA256 checksum:
 233a201f7de2701e3ce704ecd7d554c2597397f2901da1d821167ec7952eda33
Requirements:List requirements here... python, LaTeX

Note

|filename|/images/cc0.png

To the extent possible under law, Roland Smith has waived all copyright and related or neighboring rights to csv2tbl.py. This work is published from the Netherlands.