Let's say we have a table
\begin{tabular}{|c|c|}
\begin{sideways}A\end{sideways}&\begin{sideways}B\end{sideways}\\
a & b \\
\end{tabular}
How can I define the height of cells A and B, so that in case of A and B being a longer caption, the text will wrap-around the cell? Putting p{x pt} in the tabular environment's table specs doesn't seem to do the trick..