Hi I am quite new to LaTeX and have attempted to put a table together as follows:
It is pretty close to what I want but I can't seem to find a way to separate the last three columns with white space. I've used hhline to draw the purple line so that it fills in the horizontal gap but I do not want it to show up in white spaces between each column. This is what I want as the end result
Any help would be greatly appreciated and am happy for any suggestions on how to approach this.
Cheers.
JT
\documentclass[a4paper]{article}
\usepackage{colortbl,multirow,hhline, xcolor}
\usepackage[margin=2cm]{geometry}
\begin{document}
% Define colours and columns
\definecolor{Purple}{RGB}{101, 60, 139}
\newcolumntype{?}{!{\color{white}\vrule width 1.5mm}}
\newcolumntype{P}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\arrayrulecolor{white}
% Document
\begin{tabular}{P{5cm}c|c|cccc}
\hline
% R1C1
\cellcolor{Purple} &
% R1C2-4
\multicolumn{3}{?c?}{\cellcolor{Purple}\textcolor{white}{Combined cell heading}} &
% R1C5
\multicolumn{1}{c?}{\cellcolor{Purple}} &
% R1C6
\multicolumn{1}{c?}{\cellcolor{Purple}} &
% R1C7
\multicolumn{1}{c}{\cellcolor{Purple}}\\
% Drawing line to split first row
\hhline{>{\arrayrulecolor{Purple}}->{\arrayrulecolor{white}}--->{\arrayrulecolor{Purple}}--->{\arrayrulecolor{white}}}
% R2C1
\multirow{1}{*}{\cellcolor{Purple}\textcolor{white}{A}} &
% R2C2
\multicolumn{1}{?c!{\color{white}\vrule width 1pt}}{\cellcolor{Purple}\textcolor{white}{B}} &
% R2C3
\multicolumn{1}{|c!{\color{white}\vrule width 1pt}}{\cellcolor{Purple}\textcolor{white}{C}} &
% R2C4
\multicolumn{1}{|c?}{\cellcolor{Purple}\textcolor{white}{D}} &
% R2C5
\multicolumn{1}{P{1cm}?}{\cellcolor{Purple}\textcolor{white}{E}} &
% R2C6
\multicolumn{1}{P{1cm}?}{\cellcolor{Purple}\textcolor{white}{F}} &
% R2C7
\multicolumn{1}{P{1cm}}{\cellcolor{Purple}\textcolor{white}{G}}\\
\end{tabular}
\end{document}