Cellcolor - undefined control sequence

What is wrong with this please? I have error

! Undefined control sequence. Fit& 1& 2& 3& 4& 5& 6& 7& 8& 9& \cellcolor


Thank you

\documentclass[12pt,a4paper]{report}
\usepackage[locale=FR]{siunitx}
\usepackage{booktabs}
\usepackage{xcolor}

\begin{document}

\noindent
\textbf{Konvergence - MOST a BRITE}

\begin{table}[h!!]
\renewcommand{\arraystretch}{1.45}
\scriptsize
\begin{tabular}{r|S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]}

Fit&    1&  2&  3&  4&  5&  6&  7&  8&  9& \cellcolor{blue!25}10 &  11\\

\end{tabular}
\end{table}

\end{document}

• why [h!!] ? (the second ! does nothing) Apr 14 '19 at 15:48
• @DavidCarlisle There are actually more problems with his table than that.
– user156344
Apr 14 '19 at 16:10
• @JouleV "start at the very beginning" :-) Apr 14 '19 at 16:12

You need to load table option of xcolor, which loads colortbl containing \cellcolor, etc.

\documentclass[12pt,a4paper]{report}
\usepackage[locale=FR]{siunitx}
\usepackage{booktabs}
\usepackage[table]{xcolor}
\begin{document}
\noindent
\textbf{Konvergence - MOST a BRITE}
\begin{table}[h!!]
\renewcommand{\arraystretch}{1.45}
\scriptsize
\begin{tabular}{r|S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]}
Fit&    1&  2&  3&  4&  5&  6&  7&  8&  9& \cellcolor{blue!25}10 &  11\\
\end{tabular}
\end{table}
\end{document}


Btw why is your table so wide?

• for column specifying consider shorter \begin{tabular}{r|*{11}{S[table-format=5.6,table-auto-round]}} :-) Apr 14 '19 at 16:45
• and your table is to wide that can be fit in text width. Apr 14 '19 at 16:51
• This solution did not work for me, but I have a similar case to the OP. Sep 21 at 2:31