Take the 2-minute tour ×

I have created several large tables in Excel and MATLAB. Since it is very time-consuming to manually copy and paste these tables in LaTeX, I would like to include them as figures in LaTeX. I would really appreciate it if someone could help me with the following questions:

  1. Is it possible to include tables from MATLAB or Excel without having to manually copy and paste the cells in LaTeX?

  2. If I import a table as a figure into LaTeX, how can I change the caption from "Figure" to "Table" and have it listed in the "List of Tables" instead of "List of Figures"?

Thank you very much in advance for your time and help.

share|improve this question
add comment

migrated from stackoverflow.com Feb 26 '12 at 23:59

This question came from our site for professional and enthusiast programmers.

2 Answers

Part 2 is easier. If you include your table inside a table environment (\begin{table}\end{table}), it will appear in the \listoftables. Nothing will stop you from inserting a figure with \includegraphics inside the environment.

For Part 1, I usually print foreign information to PostScript and use \includegraphics from the graphicsx package. You may need to process the file in a drawing application to crop the boundaries.

share|improve this answer
Thank you so much for your response. I really appreciate your help. Shabnam –  SHA Mar 1 '12 at 19:17
add comment

To answer question 1: There is a Matlab function that exports the data from a Matlab matrix to LaTeX tabular format, check it out here: http://www.mathworks.de/matlabcentral/fileexchange/4894-matrix2latex

Simple example: In Matlab, type:

matrix2latex(mymatrix,'myfilename.tex') % Creates a file named myfilename.tex
                                        % with a tabular environment containing 
                                        % the data from mymatrix

In you LaTeX document use:


To include the table in your document as a table.

There is also a similar thing for Excel, a macro if I remember correctly: http://ctan.org/tex-archive/support/excel2latex/

share|improve this answer
add comment

Your Answer


