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.

Due to time constraints I'm considering cheating a little and importing some tables I've created in Excel into my latex document. I realise I can do this quite nicely as a 'figure' using something like the following,

\begin{figure} [t]
\centering
\includegraphics[width=\textwidth,scale=1]{abc}
\caption{Plot of Testing Time Frame vs Gross Profit/.Total Commission.}
\label{fig:abc}
\end{figure}

However, obviously this is now recognised as a figure... and appears in my list of figures rather than my list of tables.

Question, is there a way of doing this but for the PDF image imported to be recognised and labelled as a table?

share|improve this question
7  
\begin{table} instead of figure should do the trick. –  guillem Aug 31 '12 at 12:42
5  
Just a comment: I'm a graphical editor of a journal, and I'm very angry when authors do this. At least get the correct font in your Excel. In the case of "default font" Computer Modern or Latin Modern, you can get the font files here –  yo' Aug 31 '12 at 12:44
    
Another comment: the options [width=\textwidth,scale=1] are surely fighting and one of them does not take effect. –  yo' Aug 31 '12 at 12:48
5  
Maybe your better off using this tool: excel2latex. i think its also faster to use this than export images from excel and then try to import them to latex. –  jrast Aug 31 '12 at 12:51
1  
Either use the booktabs package or uncheck the "Booktabs-style formatting" checkbox in the export dialog of excel2latex. –  jrast Aug 31 '12 at 13:41

2 Answers 2

Use table instead of figure.

enter image description here

\documentclass{article}
\usepackage{graphicx}

\begin{document}
\begin{table}[hbtp]
\centering
\includegraphics[width=0.5\linewidth]{exceltable}
\caption{This is an excel table.}
\label{tab:ExcelTable}
\end{table}
\end{document}

Note:

  • Adjust the width until it suits your preferences.
  • The table example is taken from this site.
share|improve this answer
5  
very classy! -- an oak table, indeed... –  wasteofspace Sep 1 '12 at 8:25

It's better to export the table as latex source than an image. By using the excel2latex tool, this is a very easy task.

To include the exported table you have to include the following packages to your main tex file: booktabs, multicol and multirow

\usepackage{booktabs, multicol, multirow}

If you don't want to use the booktabs package, you can uncheck the "Booktabs-style formatting" chechkbox in the export dialog. multicol and multirow are used as soon as you have merged cells in your excel sheet. If you don't see any \multicol or \multirowcommand in your exported table, you don't have to include these packages.

share|improve this answer

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.