Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
Comprehensive list of tools that simplify the generation of LaTeX tables

I have some tables in excel. I use excel2latex to generate the LaTeX code to insert them into by document. excel2latex seems to mess things up pretty badly: horizontal lines, vertical text, etc. What other options are there for generating tables that do not require typing out all the tex code by hand for the table and maintain nice formatting?

share|improve this question

marked as duplicate by Qrrbrbirlbel, Werner, Alan Munn, lockstep, clemens Oct 7 '12 at 8:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

comprehensive-list-of-tools gives an overview on tools. –  Kurt Oct 7 '12 at 0:58

1 Answer 1

up vote 2 down vote accepted
  1. If you like the formatting you do with Excel, you will probably not be able to get it in LaTeX anyway, or only with significant effort. Why not saving your original table as a .PNG file or so and get it into LaTeX via \includegraphics{}?
  2. Depending upon the distribution you are using, you may have the datatools package ready for you already. Try putting \usepackage{datatool-pgfmath} in your preamble and 1=2: \dtlifnumeq{1}{2}{true}{false}. in your document. If it compiles to 1=2: false you can go to the datatool ftp site, grab the manual and start reading on page 38. This gives you easy access to the data (simply save your table as .CSV file), but you would have to do the formatting by hand, arguably with less effort than using LaTeX commands (see page 56 for a colourful table).
  3. Personally, I import Excel data into R from where there is an abundance of options for transforming data frames into LaTeX code - if you have some level of familiarity with R, you might want to explore this.
share|improve this answer
thank you for your answer: how does one save tables out of excel in png format? i do all my work in R actually and then use excel to format things for my papers/presentations. have you found it easier to directly format things into latex code from R? –  Alex Oct 7 '12 at 4:27
@alex See How can I use a table generated with R in LaTeX?. –  Alan Munn Oct 7 '12 at 4:33
@alex .PNG I produce with a screenshot; larger tables you could get via printing to .PDF although this may be too large then to be included via \includegraphics{}. For pre-formatting using R see rseek –  vaettchen Oct 7 '12 at 4:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.