# vertical text problem in table

I'm making a planning for some report, and used the LaTeX table generator to change it from Excel to LaTeX. However, if I'm running the generated code, the vertical text gets split up, which I don't want, see image below. Does one of you know how to solve this issue? I want the week number columns to have equal spacing, but cannot manage to do this. I guess it is also the problem with the combination with merged rows and merged columns...

code (only first month):

\usepackage{makecell}
\usepackage{multirow}
\usepackage{colortbl}

\begin{table}
\centering
\begin{tabular}{|c|lllll|}
\hline
\multicolumn{1}{|r|}{Week number} & 1                                                                         & 2 & 3 & 4 & 5  \\
\hline
\multicolumn{1}{|r|}{Month}       & \multicolumn{5}{l|}{January}                                                               \\
\hline
\multicolumn{1}{|l|}{Item}        &                                                                           &   &   &   &    \\
\hline
1                                 & {\cellcolor[rgb]{0.753,0.753,0.753}}                                      &   &   &   &    \\
2                                 & {\cellcolor[rgb]{0.753,0.753,0.753}}                                      &   &   &   &    \\
3                                 & {\cellcolor[rgb]{0.753,0.753,0.753}}                                      &   &   &   &    \\
4                                 & {\cellcolor[rgb]{0.753,0.753,0.753}}                                      &   &   &   &    \\
5                                 & {\cellcolor[rgb]{0.753,0.753,0.753}}                                      &   &   &   &    \\
6                                 & {\cellcolor[rgb]{0.753,0.753,0.753}}                                      &   &   &   &    \\
7                                 & {\cellcolor[rgb]{0.753,0.753,0.753}}                                      &   &   &   &    \\
8                                 & {\cellcolor[rgb]{0.753,0.753,0.753}}                                      &   &   &   &    \\
9                                 & {\cellcolor[rgb]{0.753,0.753,0.753}}                                      &   &   &   &    \\
A                                 & \multirow{-10}{*}{{\cellcolor[rgb]{0.753,0.753,0.753}}\rotcell{Holidays}} &   &   &   &    \\
\hline
\end{tabular}
\end{table}

• To make your life easier, you can define a color in your preamble and refer back to this definition instead of having to enter the same rgb values over and over again. Jan 9 '20 at 15:34
• You could also color teh whole row and change the color back to shite for the corresponding cells in the first three rows. Jan 9 '20 at 15:36
• That would indeed clean up the code, bus as I said, this was generated by the LaTeX table generator (link) where you can just select a color and the latex code is generated with the RGB values. But thank you for the suggestion :) Jan 10 '20 at 10:30
• But what if you later on decide to change the color to a slightly different shade of gray? You would have to edit all occurences of \cellcolor. Jan 10 '20 at 10:32
• That is true, it is very convient, however for this report, the color is not that important :P and the effort to change it is not worth the changing it to a 'global' color, haha :P But I definitely agree that preambling is the way to go :) Jan 10 '20 at 10:51

You can use \rotatebox. Replace the command \multirow{-10}{*}{{\cellcolor[rgb]{0.753,0.753,0.753}}\rotcell{Holidays}} with
\parbox[t]{5mm}{\multirow{-10}{*}{\cellcolor[rgb]{0.753,0.753,0.753}\rotatebox[origin=c]{90}{Holidays}}}

• Your code seems to be missing a }. Jan 9 '20 at 15:33