OthersExcel to LaTeX

Information and discussion about other tools not listed above.
Post Reply
MatthiasN
Posts: 41
Joined: Sun Mar 11, 2012 1:21 pm

Excel to LaTeX

Post by MatthiasN »

Hi everyone,

this may sound stupid, but the last hour or so I've been trying to insert a macro in excel to convert tables in excel to LaTeX code. I've found the macro here: ftp://cam.ctan.org/tex-archive/support/xl2latex/. A university linked me to it, so it should be alright.

Now the problem I'm having is that I use Excel 2010 and apparently the way to insert a macro is completely different than when you use Excel 2007 or any older version. I have been looking for a while, searching every tab and looking on the internet. But the only thing I find is how to use a macro that is already present in excel, but not how to import one (at least not for the 2010 version).

So I really hope someone can help me.

Greetings,

Matthias

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

Re: Excel to LaTeX

Post by mas »

No idea about excel macros as I do not use MS Office. But, this is an idea you can try. Why not export your cells/table to a csv file with "&" as the separator? All that remains to be done is to just add the tabular definitions in the file.

Regards.

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Excel to LaTeX

Post by nlct »

You could also just export to csv and use the datatool package.

Regards
Nicola Talbot
MatthiasN
Posts: 41
Joined: Sun Mar 11, 2012 1:21 pm

Re: Excel to LaTeX

Post by MatthiasN »

I can do that, but then I might as well make the table in LaTeX. The reason I would like to use this macro, is because it doesn't only make the table with everything you put in it, but it also takes over the complete layout.
eric-wood
Posts: 1
Joined: Tue Oct 30, 2012 1:36 am

Excel to LaTeX

Post by eric-wood »

I never managed to get Excel plugins to do this working, so I wrote my own utility:

http://ericwood.org/excel2latex/

Just drag the Excel file onto the page and it'll spit out the LaTeX code for the table! No need to install anything.

It's still kind of new and I'm working out some kinks, but for the stuff I've been using it for it's been doing a great job.

Hope that helps!
bebelher
Posts: 2
Joined: Wed Sep 26, 2012 9:16 am

Excel to LaTeX

Post by bebelher »

You can also download excel2latex, and move it to :

Code: Select all

C:\Users\[USER]\AppData\Roaming\Microsoft\AddIns
or

Code: Select all

C:\Documents and Settings\[USER]\Application Data\Microsoft\AddIns
It should appear now in Excel !
Last edited by cgnieder on Tue Oct 30, 2012 10:43 pm, edited 1 time in total.
dota_m4n
Posts: 2
Joined: Sun Jan 18, 2015 10:03 am

Re: Excel to LaTeX

Post by dota_m4n »

I have a simple method.

Put the excel table that you want to export alone on an excel sheet. Export it to PDF. Crop the pdf to only include the actual table. I use a program called inkspace. In inkspace I simply open the pdf and then press save as pdf. I tick the "file is drawing" and it automatically crops it. Include your cropped table using ./includegraphics in latex. Images based on pdf come out with good quality, pictures and tables alike.
Last edited by dota_m4n on Mon Jan 19, 2015 4:06 pm, edited 1 time in total.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Excel to LaTeX

Post by Johannes_B »

Just to be sure, do you mean Inkscape?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
dota_m4n
Posts: 2
Joined: Sun Jan 18, 2015 10:03 am

Re: Excel to LaTeX

Post by dota_m4n »

Inkscape is the one.
Post Reply