[Tex/LaTex] multicolumn tabular is not adding column separator lines

multicolumnmultirowtablestabularxtabulary

I have a table like:

\begin{table}[!htbp]
\begin{scriptsize}
\centering
\setlength\tabcolsep{3pt}
\begin{tabular}[m]{|m{2cm}|*{17}{c}|c|}
\hline
\multirow{3}{*}{Model} & 
\multicolumn{17}{c|}{APE Thresholds (\%)} & \multirow{3}{*}{Best} \\ \cline{2-18}
& 0.01 & 0.05 & 0.1 & 0.25 & 0.5 & 1 & 2 & 5 & 7.5 & 10 & 15 & 30 & 40 & 50 & 75 & 100 & None \\\hline
Open dfasdfadsfaa 
& 35 & 40 & 55 & 25 & 40 & 35 & \\
Closed 
& 25 & 50 & 35 & 40 & 45 &  \\ \hline
\end{tabular}
\caption{Hyperparameter Optimisation: APE Threshold - Words \& Depgram Features}
\label{table2}
\end{scriptsize}
\end{table}

Which looks like:

enter image description here

As you can see, there is a gap to the right of the word Best, which should be the end of the table.

What am I doing wrong/how can I improve this table? I had to set up the tab column separation to very small.

Best Answer

The easiest way to improve the table is to give it a more "open" look -- by removing all vertical lines and using the line-drawing macros of the booktabs package for the horizontal lines. To assure that the tabular material takes up the entire available text block width, use a tabular* environment. And, as it appears to be necessary to render the table using \scriptsize, reduce the font size of the caption as well; in the example below, I use one of the facilities of the caption to set the font size of the caption.

enter image description here

\documentclass{article}
\usepackage{array,booktabs,caption,ragged2e}
\begin{document}

\begin{table}[!htbp]
\captionsetup{size=footnotesize}
\scriptsize
\setlength\tabcolsep{0pt} % let tabular* figure out intercolumn whitespace

\begin{tabular*}{\textwidth}{>{\RaggedRight}p{2cm} @{\extracolsep{\fill}}*{18}{c}}
\toprule
Model & \multicolumn{17}{c}{APE Thresholds (\%)} & Best \\ 
\cmidrule{2-18}
& 0.01 & 0.05 & 0.1 & 0.25 & 0.5 & 1 & 2 & 5 & 7.5 & 10 & 15 & 30 & 40 & 50 & 75 & 100 & None \\
\midrule
Open dfasdfadsfaa
& 35 & 40 & 55 & 25 & 40 & 35 & \\
Closed
& 25 & 50 & 35 & 40 & 45 &  \\ 
\bottomrule
\end{tabular*}

\caption{Hyperparameter Optimisation: APE Threshold---Words \& Depgram Features}
\label{table2}
\end{table}

\end{document}
Related Question