[Tex/LaTex] Tabular height does not fit rotated text

multirowrotatingtables

I have a problem with one of my tables.
My table with the Problem
As you can see on the left side the text is going out of bounds. I have tried many different things and nothing worked so far.

My code:

\documentclass{article}

\usepackage{rotating}
\usepackage{multirow}

\begin{document}
\begin{tabular}{c|p{0.40\textwidth}|p{0.50\textwidth}}
& \textbf{Vorteile} & \textbf{Nachteile} \\\hline
\multirow{3}{*}{\begin{sideways}\textbf{Kundensicht}\end{sideways}} & Jederzeit und überall verfügbar & fehlender physischer Kontakt mit den Produkten\\
& Unabhängig von Öffnungszeiten & Mindestbestellwert und zusätzliche Kosten\\
& Markttransparenz & Sicherheit bei der Zahlungsabwicklung \\\hline
\multirow{3}{*}{\begin{sideways}\textbf{Anbietersicht}\end{sideways}} & globale Präsenz & hoher technischer Aufwand\\
& Gewinnung von Kundendaten & kein schneller ROI \\
& Cross-/Up-Selling & Abhängigkeit von Google\\\hline
\end{tabular}
\end{document}

I saw possibilities to change the height manually but it was always for the entire table, and as you can see, the top row does not need more space. After three hours of searching for possibilities to chance it and trying them out, I give up.

What I would like to have is, that the text on the left side fits perfectly, sideways and is centered in the cell and the text to its right is distributed equally in its cell, as well.

If anyone has any idea and could help me out, I would really appreciate it!

Best Answer

enter image description here

Since you not provide complete small document with your table, below is only snippet from my table testbed :)

\usepackage{makecell}
\renewcommand\theadfont{\bfseries\normalsize}

\begin{tabular}{c|m{0.40\textwidth}|m{0.50\textwidth}}
    & \textbf{Vorteile}                 & \textbf{Nachteile}            \\
    \hline
\settowidth\rotheadsize{\theadfont Kundensichte}
\rothead{Kundensicht}
    &   \makecell[l]{Jederzeit und überall verfügbar\\
        Unabhängig von Öffnungszeiten               \\
        Markttransparenz} 
        &   \makecell[l]{Fehlender physischer Kontakt mit den Produkten \\
             Mindestbestellwert und zusätzliche Kosten                  \\
            Sicherheit bei der Zahlungsabwicklung}  \\
        \hline
\settowidth\rotheadsize{\theadfont Anbietersicht}
\rothead{Anbietersicht}
    &   \makecell[l]{globale Präsenz              \\
                     Gewinnung von Kundendaten    \\
                     Cross-/Up-Selling}  
        &   \makecell[l]{hoher technischer Aufwand     \\
                         kein schneller ROI            \\
                         Abhängigkeit von Google}   \\
    \hline
\end{tabular}

Edit:

Of course you can define new command for rotate cell content. For example, like this:

\newcommand\RH[1]{% RotHead (with online measurement of cell height) ...
                  \settowidth\rotheadsize{\theadfont #1}
                  \rothead{#1}}

and then instead

\settowidth\rotheadsize{\theadfont Kundensichte}
\rothead{Kundensicht}

use it in above table as

\RH{Kundensicht}