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.

I am wondering if there is any tool that can help me work with tables in LaTeX. Specifically I'd like to be able to import HTML tables (or small Excel tables) into LateX

Are there tools that can help me do that painlessly?

share|improve this question
4  
Bear in mind that properly formatted tables for publication are not the same as the sort of thing that Excel, etc., produce. So even if you can import stuff quickly you may well have to work on the appearance. –  Joseph Wright Aug 16 '10 at 7:48
add comment

5 Answers

I think that, if you are able to import your html tables in Excel or OpenOffice Calc, these tools are what you need:

The first one is a macro you add to your Excel, and provides you with an extra button to create the LaTeX code for the table from a set of selected cells, ready to be pasted in your .tex source. The second, is an extension of OO, but should work in the same way.

Edit: there is also html2LaTeX, but I never used it.

Happy TeXing!

share|improve this answer
    
I have started a comprehensive list -- do you want to add a description of Calc2LaTeX, especially comparing it to current Excel2LaTeX? –  krlmlr Mar 29 '12 at 7:31
add comment

Check out this page http://www.ctan.org/tex-archive/help/Catalogue/entries/datatool.html and tools it links ie csvtools and pgfplotstable. They allow you to keep the data in csv or tsv format and configure typesetting options in .tex source. I have used pgfplotstable and it is very handy.

share|improve this answer
2  
This is a good alternative to directly importing the data, particularly for large data sets or ones that will change over time. –  Joseph Wright Aug 16 '10 at 7:50
    
I agree: CSVtools is very powerful and it's worth considering the csv way against the conversion from excel to the latex code, especially for large amount of data. In case of small tables, converting from excel could be more convenient. –  Alessandro Cuttin Aug 17 '10 at 10:06
    
But when the table is small inputing isn't much of a problem. –  Leo Liu Aug 17 '10 at 10:27
3  
csvtools has been replaced by the datatool package (by the same author.) –  Alan Munn Mar 20 '11 at 0:28
    
@Leo: I have started a comprehensive list -- do you want to add datatool? I'm not familiar with it. –  krlmlr Mar 29 '12 at 7:30
add comment

If you use TeXShop on the Mac, there is a built-in macro for pasting copied spreadsheet cells directly into your latex sources into a variety of popular table formats. The same scripts are also available for other Mac text editors here: csv2latex. (OB Disclaimer: I am the author.)

share|improve this answer
    
I have started a comprehensive list -- do you want to add your tool? I'm not familiar with it, and I don't have a Mac. –  krlmlr Mar 29 '12 at 7:30
    
This is a dead link now.... –  Daи Aug 27 '13 at 18:41
    
@Dan Thanks. I've fixed the link. –  Alan Munn Aug 27 '13 at 20:29
    
@AlanMunn thanks. +1 –  Daи Aug 27 '13 at 20:42
add comment

Perhaps you will feel comfortable defining tables in CALS syntax immediately in LaTeX.

The CALS table model is the historic precursor of the HTML table model. It is easier in use and offers more capabilities than tabularx.

Here is the documentation of the cals package:

share|improve this answer
add comment

The on-line LaTeX table editor at http://truben.no/latex/table/ is very handy. You can import your data in LaTeX, JSON or CSV format (the last of these being relevant to this question), and export it in LaTeX format (among numerous other formats). It's also very easy to insert/delete columns, etc., and change the formatting.

share|improve this answer
    
Welcome to TeX.SX! –  Papiro Jun 24 '13 at 13:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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