[OS X TeX] Excel tables to LaTeX - new script
amunn at msu.edu
Sun Sep 13 20:40:48 EDT 2009
At 10:22 AM +0200 9/13/09, Timothy Van Zandt wrote:
>This works perfectly and is a real time-saver. Thanks!!
>It is a more general-purpose tool than you say. It converts any text in the
>clipboard that is delimited by tab and cr.
>I tried it with another spreadsheet program, Quantrix, and it didn't recognize
>the new lines. I disovered that Quantrix copies stuff to the clipboard ending
>lines in nl rather than cr. Perhaps you'd like to change the script so that it
>it works with either nl or cl or nl-cr.
Thanks for the suggestion. It's an easy enough fix. I've changed the
script and now renamed it csv2latex (which will also allow me to put
it on CTAN without any name conflict.) The change also allows the
script to work with Open Office Calc, which was a previous limitation.
Since Quantrix is proprietary, could you test it out and report back
to me that it works? I've tested the new script a with csv file
created just with nl in an editor, but it would be good to check that
it works with Quantrix. I've tested it with Excel, Open Office Calc
and Numbers, and it works with all. I think that the Calc format is
the same as the Quantrix format.
The new script (with updated documentation) is available here:
When I hear back from you I'll put it on ctan also.
>Timothy Van Zandt
>Professor of Economics
>-------- Original Message --------
>Subject: [OS X TeX] Excel tables to LaTeX - new script
>From: Alan Munn <amunn at msu.edu>
>To: macosx-tex at email.esm.psu.edu
>Date: 15/7/09 02:55
>>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 LaTeX, but now that I have the latest and greatest [sic] Excel
>>2008, which no longer supports VB Macros I'm back to square 1.
>>A while ago when this discussion cropped up here, some one posted a
>>nice Ruby script by Tom Counsell which does the trick very nicely.
>>I've now taken Tom's script and modified it to make it support more
>>table types, and added an applescript which can be used as a
>>TeXShop macro, so that inserting an Excel table in TeXShop can now
>>be as simple as copying from Excel and pasting using the macro.
>>If you think you would find this useful, please try it out:
>>Questions and comments (and bug reports?) are welcome.
>>I'd especially welcome additions to the documentation which would
>>explain how to use the script with editors other than TeXShop,
>>since it certainly can be.
>>Perhaps this would be a useful thing to add to TeXShop itself.
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