# Weird problem with LaTeX/excel2latex

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
\begin{tabular}{rrrr}
\toprule
1     & 4     & 6     & 8 \\
\midrule
-53   & 9     & 10    & 10 \\
\bottomrule
\end{tabular}%
\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 errors but if I remove the last two lines and type it manually, it work.

-
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
^^@ 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
Are you using OS X by any chance? – krlmlr Mar 24 '15 at 14:11

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.