I want to typeset a table with rotatetd column headers (so far it works) stretching over multiple rows.
The problem seems to be that multirow does not adjust the tables row heights, thus I have to do this by hand, and I struggle with this.
Using a slightly adopted solution from Werner (https://tex.stackexchange.com/a/32687/19326), I get the rotating and can have line breaks.
I now want to calculate the height by which I have to stretch my "stretch column". The value I need to calculate is obviously the height of my rotated box, minus the heights of the rows that I am spanning.
How do I retrieve the height of a row?
What is the easiest way to calculate objectheight - rowheight1 -rowheight2?
Here is the code I have so far:
\documentclass{report}
\usepackage{xparse}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{pbox}
\usepackage{rotating}
\usepackage{calc}
%\NewDocumentCommand{\rot}{O{90} O{1em} m}{\makebox[#2][l]{\rotatebox{#1}{\pbox[t]{\textwidth}{#3}}}}%
\NewDocumentCommand{\rot}{O{90} O{1em} m}{\makebox[#2][l]{\begin{turn}{#1}{\pbox[t]{\textwidth}{#3}}\end{turn}}}%
\begin{document}
\newlength{\myl}
\settowidth{\myl}{Long Long}
\the\myl
\begin{tabular}{cccc}
\toprule
& \multirow{3}{*}{\rot{Long Long\\ text}}& & \\[\the\myl] %column which I want to stretch
Sample & & \multicolumn{2}{c}{Group} \\
\rot{a} & & A & B \\
\midrule
data & data & data & data \\
\bottomrule
\end{tabular}
\widthof{test}
\end{document}
Note: I would like to use \widthof{test} since this appears easier to me than the length fiddling, however the \widthof{test} command actually typesets test in my case.
I looked at Text in rotated multirow cell crosses table border (Basically where I got the idea to adjust the row height from, however I am not sure that my rowheight will always be \normalbaselineskip) and How to rotate text in multirow table? which does not help since it is concerned about the positioning of the rotated text rather than stretching the group of rows to accomodate the text.

\multirowheadand\rotheaddo not seem to work together. – ted Apr 11 '15 at 22:50\multirowthead. The precise syntax should be:\multirowthead{n}{\rothead{…}}. I have no problem to compile it. – Bernard Apr 11 '15 at 23:11Long long text, to be aligned to the\\midrule(i.e. starting in the row witha A Band going up). Basically like in your second example, but starting from the row below. If I have multiple rotated rows I would like them bottom aligned ('left aligned before rotation') – ted Apr 11 '15 at 23:14-4for rows, there is only one row before, so I end up with-2, also where do you get\\[5ex]and\\addlinespace[6.5ex]from. While I can see that they are needed to make it work, I would like to understand the reasons behind these numbers. – ted Apr 15 '15 at 12:25multirowworks with number of lines, not number of rows. These are the same as long as cells contain only one-line text. Here there must be some messing up for latex, due to the rotated material. So making latex believe there are 4 rows did the trick (4 was obtained by trials & errors). Same trials & errors method for the vertical spacing added between rows. – Bernard Apr 15 '15 at 12:38