[Tex/LaTex] Comprehensive list of tools that simplify the generation of LaTeX tables

big-listconversionexcel2latextablestools

Manually hacking tables in LaTeX is one of the less funny things when preparing a document. Naturally, there are quite a few tools that promise to simplify this. In fact, I have somewhat lost track of all the tools available, and I'd like to gather your valuable experience into one big post. Some of the tools are mentioned in Tool for manipulating LaTeX tables (HTML to LaTeX), but I feel there's much more around.

I'd suggest that somebody starts an overview with an alphabetic list (so that I can accept this answer and it stays on top), and that everyone replies with a "community wiki" entry, one reply per tool, and inserts the tool into the list.

Personally, I use Excel2LaTeX, but I'm unhappy with having to fire up Windows in order to generate the LaTeX code. I'm thinking of a rewrite as a standalone Python tool using the xlrd library, but I'm not too inclined to reinvent the wheel.

Best Answer

Often, I have the use-case that I want to convert a given data table into a "suitable" LaTeX table.

Typically, my data is of numeric type and requires number formatting, perhaps alignment at a decimal point, and in most cases, it requires elementary post-processing (like quotients, differences, gradients).

Since I needed such stuff very often, I wrote some C++ scripts which generated .tex files. It was useful - but I realized very early that it is insufficient; it is just not flexible enough and -as any external tool- produces unwanted complications due to the many tools involved.

My solution is the LaTeX package pgfplotstable. It is a LaTeX table generator, i.e. it converts input data explicitly by a set of configurable rules into something like \begin{tabular}....\end{tabular}.

DISCLAIMER NOTE: I wrote the package.

Among its features are

  • separation of data + format
  • data in form of external data files (CSV with customizable separators) or inline tables (inside of the .tex file)
  • central format definition (for example in the preamble or in form of styles)
  • format numbers with the full power of LaTeX
  • supports simple text columns as well
  • simple support for alternating row colors (colortbl)
  • simple support for standart LaTeX table packages (booktabs, longtable, colortbl, multirow, \multicolumn,...)
  • can produce completely new columns containing postprocessed data, with the powerful pgf math engine
  • can convert single-column output to two-column output
  • is written completely in TeX (no external tools required)
  • highly customizable
  • has a manual with lots of examples.

You may want to inspect the link mentioned above and its examples to see if it fits your needs.