Considering the answer of question, I used the slashbox package to draw a diagonal line. But the problem is I have multiple rows in my table and that makes the line not aligned well within the cell corners. It also gives wierd spaces between cells:
\documentclass{article}
\usepackage{slashbox}
\usepackage{adjustbox}
\begin{document}
\begin{table}[!htpc]
\begin{center}
\centering
\caption{some table.}
\label{possibility}
\begin{footnotesize}
\adjustbox{max height=\dimexpr\textheight-5.5cm\relax,
max width=\textwidth}{
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
% after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
&first & first & second & second & both & both & &\\
&key & key & key & key& key & key & none&all\\
\backslashbox{Room}{Date} &at & at & at & at & at & at& & \\
&d & p & d & p & d & p & &\\ \hline
$C_1$&Y & N & N & N & N & N & N &N \\ \hline
\hline
\end{tabular}
}
\end{footnotesize}
\end{center}
\end{table}
\end{document}
EDIT
I have used the answer presented by @bernard but it gives me ! Use of \line doesn't match its definition as an error. Not sure if it would happen for others as well.


! Use of \line doesn't match its definition.– lonesome May 16 '17 at 09:50\multirow, solved by changing4to5.2. – Bernard May 16 '17 at 10:00\lineis supposed to be the interrow spacing in the table. For vertical spacings I would suggestex, as the number of these should not change much if you decide to change the document font size (ideally, should not change at all). – Bernard May 16 '17 at 10:23[height=5.17\line]with something to act similarly? should I just use 5.17 as the length? – lonesome May 16 '17 at 10:42! Illegal unit of measure (pt inserted).– lonesome May 16 '17 at 10:56\lineeven I just copy pasted the entire code of yours. – lonesome May 17 '17 at 02:212.2) ofdiagbox? It might be a possibility. – Bernard May 17 '17 at 08:04.logfile. I obtain this line on my system:Package: diagbox 2016/12/28 v2.2 Making table heads with diagonal lines. Other than that,[height=14ex]is fine for me. – Bernard Jun 02 '17 at 08:00