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 try to use excel2latex for converting excel tables into LaTeX. Here is the simple code I am using:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{booktabs}
\begin{document}
\begin{table}[htbp]
\centering
\caption{Add caption}
\begin{tabular}{rrrr}
\toprule
1     & 4     & 6     & 8 \\
\midrule
-53   & 9     & 10    & 10 \\
\bottomrule
\end{tabular}%
\label{tab:addlabel}%
\end{table}%
\end{document}

basically, when I copy the LaTeX code from excel2latex add-in and paste it in my LaTeX code, I get tons of errorserror list but if I remove the last two lines and type it manually, it work.

share|improve this question
3  
Your given code runs perfect on my system (MiKTeX). Can you add the two lines causing the errors? It seems to be a code problem. You seems to have a special character in your excel style sheet that can't be converted correctly. Can you delete this character in your excel file? –  Kurt Oct 30 '12 at 0:13
2  
^^@ represents ASCII "NUL" (byte 0); from the form of the error lines it seems that line 29 contains a row of NULs. –  egreg Oct 30 '12 at 13:15
    
@egreg Looks like an answer to me :-) –  Joseph Wright Nov 20 '12 at 19:39

1 Answer 1

up vote 3 down vote accepted

When TeX shows ^^@, it wants to represent the ASCII character NUL (byte 0). Judging from the error messages, it seems that your editor has inserted a row consisting of NUL characters.

As a protection against this kind of invisible characters, LaTeX declares that ^^@ (or NUL) is invalid if found in the input file.

Check your file and zap the offending characters.

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.