First, of you will make it a lot easier for others to help if you provide a full minimal example instead of a sniplet, then we do not have to guess the rest.
Secondly, don't just ignore compilation errors. I get the following error
! Misplaced \omit.
\@cline #1-#2\@nil ->\omit
\@multicnt #1\advance \@multispan \m@ne \ifnum \@...
l.8 \cline{3-7}
Which can be a bit hard to decipher, thus it is a good idea to cite this error in your question.
This error is due to how \caption
works in longtable
, it is basically a hidden \multicolumn
, thus that line has to be ended with \\
And then your document compiles just fine
\documentclass{article}
\usepackage{longtable}
\begin{document}
\begin{longtable}{|cc|c|c|c|c|c|}
\caption{Result table}\\
\cline{3-7}
\multicolumn{2}{c}{}&\multicolumn{5}{|c|}{Name}
\endfirsthead
\multicolumn{2}{c}{}&\multicolumn{1}{|c|}{Line 3}&M&N1&T&N2\\
\hline
Data&AW0&3,05,185&44,064&42,217&23,735&42,578\\
\cline{2-7}
&AW2&4,29,520&60,437&59,258&35,445&59,619\\
\cline{2-7}
&AW3&4,60,671&64,603&63,519&38,333&63,880\\
\hline
\end{longtable}
\end{document}
Though, note that nowadays people does not really use vertical lines in tables any more as it actually make it harder to read than with out them.
\coaption{...}\\