# Extra Vertical line at the end of the long table

I am using share latex and trying to create a long table. When I generated the long table an extra vertical row is created at the end visible in the attached image. I would appreciate any help. Thanks in advance.

\documentclass{article}
\usepackage{threeparttable}
\usepackage{longtable}

\begin{document}

\begin{longtable}{|p{2cm}| p{4cm}|p{5cm}|}
\caption{Features used by Bebei}\\

\hline
\textbf{ index}& \textbf{Features name}  & \textbf{Explanation}\\
\hline
\multicolumn{3}{c}%
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \tabularnewline
\hline
\textbf{ index}& \textbf{Features name}  & \textbf{Explanation}\\
\hline
\hline \multicolumn{3}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot

1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
%\hline

\label{tab:bebeifeatures}
\end{longtable}

\end{document}

• it's the \label making an empty cell stick it in another cell or in the argument to caption or pretty much anywhere other than where it is:-) – David Carlisle Nov 11 '16 at 7:50
• @DavidCarlisle, You are right label is the culprit. Thanks for your help. I might have to find other way to refer the table. – curious Nov 11 '16 at 21:43
• why do you need another way to refer to the table? you can use \label just place it in an existing cell not a new cell on its own. – David Carlisle Nov 11 '16 at 21:53
• I'm voting to close this question as off-topic because OP says it's been solved in comments – Moriambar Jun 9 '17 at 17:58
• @DavidCarlisle You should convert that to an answer – Andrew Swann Jun 9 '17 at 18:38

As pointed out by David Carlisle \label was creating the extra vertical line. The solution is to add the \label to an existing cell.

\documentclass{article}
\usepackage{threeparttable}
\usepackage{longtable}
\begin{document}
\begin{longtable}{|p{2cm}| p{4cm}|p{5cm}|}
\caption{Features used by Bebei}\\

\hline
\textbf{ index}& \textbf{Features name}  & \textbf{Explanation}\\
\hline
\multicolumn{3}{c}%
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \tabularnewline
\hline
\textbf{ index}& \textbf{Features name}  & \textbf{Explanation}\\
\hline
\hline \multicolumn{3}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot

1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
\hline
1 & Number of objects & This is supposed to be the  largest sentence i am using for \label{tab:bebeifeatures}\\
\hline
%\hline

\end{longtable}
\end{document}