[Tex/LaTex] Multicolumn and hline

multicolumntables

If I run the following code I got a table with a multicolumn of 5 but if I place an \hline before the multicolumn as seen in the code it closes all the table in the upper part. How can I close only the 5 multicolumn leaving the other part without lines?

\begin{tabular}{|r{1.5cm}|c{1.5cm}|c{1.5cm}|c{1.5cm}|c{1.5cm}|c{2.5cm}|c{1.33cm}|c{1.3cm}|c{2cm}|}
\hline %with this command the line is for all the table not just the 5 columns
\multicolumn{5}{|c|}{Mensual} \\
\hline
& L\'iquido & S. Social & IRPF & TOTAL & Anual l\'iquido & \multicolumn{2}{|c|}{} & Total Anual\\ 
Nombre & (A) & (B) & (C) & A+B+C & (D) = A $\times$ pagas& \multicolumn{2}{|c|}{Por Caja o ``B''} & (D) + Caja\\ \hline
Jos\'e & 2.563,56 \euro & 172,82 \euro & 864,12 \euro & 3.600,5 \euro & \textbf{38.453 \euro} & 21.295 \euro & 9.851 \euro & \textbf{69.599 \euro}\\ \hline
Pedro & 1.949,50 \euro & 170,60 \euro & 669,50 \euro & 2.789,6 \euro & \textbf{41.844 \euro} & \multicolumn{2}{|c|}{Sin Datos}& \textbf{41.844 \euro}\\ \hline
Antonio & 2.240,72 \euro & 181,99 \euro & 601,84 \euro & 3.024,6 \euro & \textbf{26.889 \euro} & \multicolumn{2}{|c|}{10.125 \euro}& \textbf{37.014 \euro}\\ \hline
Lina & 1.870,12 \euro & 152,01 \euro & 334,13 \euro & 2.356,3 \euro & \textbf{28.052 \euro} & \multicolumn{2}{|c|}{Sin Datos}& \textbf{28.052 \euro}\\ \hline
\end{tabular}

Best Answer

an alternative with use of siunitx and similar "open look" of table as propsed Mico in his answer:

\documentclass{article}
\usepackage{booktabs, makecell}
\usepackage{eurosym}
\usepackage{siunitx}

\usepackage{etoolbox}
\newcommand{\B}{\fontseries{b}\selectfont} % renew def. for non-extended bold font
\robustify\B


\begin{document}

\begingroup
    \sisetup{detect-weight,
            output-decimal-marker={,},
            group-minimum-digits=4,
            group-separator={.}
            }
    \setlength\tabcolsep{3pt}
    \small
\begin{tabular}{@{}l
                S[table-format=4.2]
           *{2}{S[table-format=3.2]}
                S[table-format=4.1]
                S[table-format=4.0]
                S[table-format=5.0]
                S[table-format=4.0]
                S[table-format=5.0]
                @{}}
    \toprule
    & \multicolumn{4}{c}{Mensual}   &   \multicolumn{4}{c}{}    \\
    \cmidrule(lr){2-5}
\thead[b]{Nombre}
    &   {\thead[b]{L\'iquido\\ (A)}}
        &   {\thead[b]{S. Social\\ (B)}}
            &   {\thead[b]{IRPF\\ (C)}}
                &   {\thead[b]{TOTAL\\ (A + B + C)}}
                    &   {\thead[b]{Anual l\'iquido (D)\\
                        $=(\mathrm{A})\times \mathrm{paagas}$}}
                        &   \multicolumn{2}{c}{\thead[b]{Por Caja o ``B''}}
                            &   {\thead[b]{Total Anual\\
                                $(D) + \mathrm{Caja}$}}                              \\
    \cmidrule(lr){7-8}
    & {\euro} & {\euro} & {\euro} & {\euro} & {\euro} & {\euro} & {\euro} & {\euro} \\
     \midrule
Jos\'e  & 2 563.56  & 172.82 & 864.12  & 3 600.5 & \B 38 453 & 21 295 & 9 851  & \B 69 599 \\ Pedro   & 1 949.50  & 170.60 & 669.50  & 2 789.6 & \B 41 844
            &   \multicolumn{2}{c}{Sin Datos}    & \B 41 844         \\
Antonio & 2 240.72  & 181.99 & 601.84  & 3 024.6 & \B 26 889
            &   \multicolumn{2}{c}{10.125}       & \B 37 014        \\
Lina    & 1 870.12  & 152.01 & 334.13 & 2 356.3  & \B 28 052
            &   \multicolumn{2}{c}{Sin Datos}    & \B 28 052        \\
\bottomrule
    \end{tabular}
    \end{document}

enter image description here