I am having a problem with LaTeX at the moment, which I seem completely incapable of solving. I am trying to create a simple table which has 4 columns and (should have in the end) 36 rows, including a header row. That header row, I want it to have a grey background.
Now, I have solved most of the issues concerning that topic, but in the end, my table refuses to put a vertical like between the 3rd and 4th header column - as long as it has the grey background color.
Before I tried to use the \cellcolor[...] option, and when I removed it for that 3rd and 4th cell, LaTeX would draw that vertical line.
So I tried with the \rowcolor[...] option, but the same thing. It's just either grey background or the missing vertical line.
I have tried two ways to draw that table, but the problem persists. Here is my example document, with two options that I tried to draw that table:
\documentclass[12pt,a4paper,toc=listofnumbered]{scrbook}
\usepackage[table]{xcolor}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\definecolor{dunkelgrau}{rgb}{0.8,0.8,0.8}
%First Option, but here is the upper left vertical line and the upper horizontal line missing
\begin{document}
\begin{table}[h]
\begin{tabular}{|c|c|c|c|}
\rowcolor{dunkelgrau}
\hline
\textbf{Proben-Nr.} & \textbf{Lokalität} & \textbf{Höhe in cm} & \textbf{Schliff-Nr.} \\
\hline
A & B & C & D \\
\hline
A & B & C & D \\
\hline
\end{tabular}
\end{table}
%Second option, here the frame is entirely complete, just the missing vertical line between the 3rd and 4th header cell
\begin{tabular}{|c|c|c|c|}
\rowcolor{dunkelgrau}
\hline Proben-Nr. & Lokalität & Höhe in cm & Schliff-Nr. \\
\hline A & B & C & D \\
\hline A & B & C & D \\
\hline
\end{tabular}
\end{document}
