Does not work in Mac Office 2011

Bug #1071992 reported by Naser Nikandish
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Excel2LaTeX
Fix Released
Undecided
Unassigned

Bug Description

I just installed my Office 2011 and tried to add this addin. When I hit convert excel to latex, the window shows up but the code that it gives me does not compile in latex! Plus hitting "browse" in this window brings up "debug" window.

Thanks

Revision history for this message
Kirill Müller (krlmlr) wrote :

What is the LaTeX code that the addin produces? And what is the error message you see when compiling it in LaTeX? What command do you use for compilation?

Revision history for this message
Naser Nikandish (n-nikandish) wrote :

I use MacOffice 2011 with Lion.
I use command convert table to latex.
Here is the code I am getting:
\begin{table}[htbp]
  \centering
  \caption{Add caption}
    \begin{tabular}{rr}
    \toprule
    1 & 4 \\
    \midrule
    2 & 5 \\
    3 & 6 \\
    \bottomrule
    \end{tabular}%
  \label{tab:addlabel}%
\end{table}%

And when I try to insert this code in my latex document, I get tons of errors. Am I missing something? Thanks a lot

Revision history for this message
Kirill Müller (krlmlr) wrote :

Do you have the code

\usepackage{booktabs}

in the preamble of your LaTeX document?

As for the error when hitting "Browse...", I'll have to check if I can replicate this. I don't own a Mac, so this might take some time for me.

Revision history for this message
Naser Nikandish (n-nikandish) wrote :

Actually if the code works fine, I dont care much about the error window, cause that's not the main point of this wonderful package.
I tried the following code (with and without \usepackage{booktabs} ) and both times I got tones of error. I really appreciate your time and help. I am very new to latex, I hope its just my silly mistake.

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{booktabs}
\begin{document}
% Table generated by Excel2LaTeX from sheet 'Sheet1'
\begin{table}[htbp]
  \centering
  \caption{Add caption}
    \begin{tabular}{rr}
    \toprule
    1 & 3 \\
    \midrule
    2 & 4 \\
    \bottomrule
    \end{tabular}
  \label{tab:addlabel}
\end{table}

Revision history for this message
Kirill Müller (krlmlr) wrote :

Do you have an

\end{document}

at..., well, the end of your document? Otherwise the code looks fine. If you have booktabs checked in Excel2LaTeX, you need the booktabs package.

If this doesn't help, could you please post the first few erro messages you are seeing?

Revision history for this message
Naser Nikandish (n-nikandish) wrote :

Yeah I had \end{document}. Well the good news is: I found the potential problem. I know this is gonna sound crazy, but that's what I found. I tried a different table, got the same errors (attached file). Then I removed the empty ine between \end{table} and \end{document} and it worked. I know this is a bit silly, but I thought this might help to find the problem. Please let me know if I am doing a silly mistake...

Revision history for this message
Kirill Müller (krlmlr) wrote :

This is a LaTeX error. LaTeX sees a paragraph (=a blank line) but no text around it, and goes bonkers.

If you really want just a single document that contains only the table, consider also unchecking "Create table environment" in Excel2LaTeX. The table environment creates a "floating" table with a caption, omitting it will typeset the table along with the running text, but without caption.

Revision history for this message
Naser Nikandish (n-nikandish) wrote :

Hi,

I am afraid that's not true. Look at the attached picture. Even though there is no blank line in the code and still I get error. I have to retype \end{table} and \end{document} to be able to get the results. and after doing this, if I add blank line between satements, it still works! Any comment/idea?

Revision history for this message
Kirill Müller (krlmlr) wrote :

Post your example (the generated LaTeX code) to tex.stackexchange.com. The error you are seeing is LaTeX related and will happen even if you type the table manually.

Revision history for this message
Kirill Müller (krlmlr) wrote :

After seeing your post on tex.sx, I recall that this is a known problem in Office Mac: https://bugs.launchpad.net/excel2latex/+bug/933070. You get extra "zero" characters when copying using the "Copy" button. Have you tried copy-pasting by selecting the text field? Also, you should be able to save the generated table into a file by hitting "Save" -- just enter the file name manually, and the file should go where your Excel file lives.

Revision history for this message
Naser Nikandish (n-nikandish) wrote :

Thanks a lot for the clarification

Kirill Müller (krlmlr)
Changed in excel2latex:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.