[OS X TeX] Excel tables to LaTeX - new script
amunn at msu.edu
Wed Jul 15 11:42:15 EDT 2009
At 11:07 AM -0400 7/15/09, Ross Moore wrote:
>On 14/07/2009, at 10:21 PM, Alain Schremmer wrote:
>>>On 15/07/2009, at 12:55 PM, Alan Munn wrote:
>>>>Tables are always a pain in the neck to write in LaTeX. I used to
>>>>use an Excel macro xl2latex.xls which would convert an Excel table to
>>Occasionally, spreadsheet ARE nice for getting something and it is
>>when you want to show off what you ended up with that you want to
>>translate it into LaTeX as it's kind of wasteful to have to redo it
>>from scratch in LaTeX.
>Why redo from scratch?
>It is very easy to add extra columns for the & symbols,
>and "fill down"; similarly for the '\\' or '\cr' at the
>end of each row. Then a simple Copy-Paste into your
>text editor (TeXshop ?) gives most of what you'll need
>to get the table into a form acceptable to LaTeX.
>Of course if you have merged cells, then it gets a bit
>more complicated, but the principles are the same:
> --- add more columns to put the extra markup, even
>if only a single '}'.
>It can also help to work with a 2nd copy of your table,
>in the Spreadsheet, obtained using 'Copy' then
>'Paste Values' (into a new worksheet, say). This overcomes
>any difficulties that may result from formulas or rounding
>in floating-point data.
>>But tables CAN be a pain in the whatever to do in LaTeX.
>>As for the rest, how about TeXTable? I have it, I have used it but
>>I am not too much into tables so I cannot really say. Also, doesn't
>>Open Office translate in LaTeX too?
>I've never used a special tool to get from Excel
>to LaTeX. Some simple actions, as outlined above,
>have been sufficient for some quite complicated
>tables that I've worked with over many years.
I agree with this. The script simply makes the formatting as simple
as cut and paste, which even for small tables makes the work faster.
(Of course, it doesn't deal with merged cells intelligently either.)
Alan Munn amunn at msu.edu
Department of Linguistics
and Germanic, Slavic, Asian and African Languages Tel.
Michigan State University, East Lansing MI 48824 USA Fax 517-432-2736
More information about the MacOSX-TeX