1

This question already has an answer here:

I'm experimenting with the excel2latex tool to quickly get my Excel tables to latex code. However if I check the use booktabs package option in the Excel2Latex AddIn and paste my code into Latex I get some vertical space which is not filled by border or by background color. If I disable the booktabs option it just works fine.

So my Question is: How can I use the booktabs package with a complete background color fill and closed borders?

See my MWE and Screenshots below or visit https://www.overleaf.com/11497648yfczshwxcwkc

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabularx, booktabs, multirow}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\usepackage{bigstrut}

\begin{document}

% Table generated by Excel2LaTeX from sheet 'Tabelle1'
\begin{table}[h]
  \centering
  \caption{Add caption}
    \begin{tabular}{|r|r|r|}
    \toprule
    1 & 2 & 23 \\
    \midrule
    12 & 2 & 2 \\
    \midrule
    13 & 1 & 1 \\
    \bottomrule
    \end{tabular}%
  \label{tab:addlabel}%
\end{table}%


% Table generated by Excel2LaTeX from sheet 'Tabelle1' without bookstabs
\begin{table}[h]
  \centering
  \caption{Add caption}
    \begin{tabular}{|r|r|r|}
    \hline
    1 & 2 & 23 \bigstrut\\
    \hline
    12 & 2 & 2 \bigstrut\\
    \hline
    13 & 1 & 1 \bigstrut\\
    \hline
    \end{tabular}%
  \label{tab:addlabel}%
\end{table}%


\end{document}

Table Image: https://imgur.com/a/XLeOy

marked as duplicate by Troy, Stefan Pinnow, Bobyandbob, Andrew Swann, TeXnician Oct 30 '17 at 14:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    This is by design in order to improve the look and readability of tables. – user31729 Oct 9 '17 at 12:35
  • ok I understand that it adds some vertical space to improve the readability, but why are the vertical lines not growing to the same height? Is this by intention as well? – Valentin Oct 9 '17 at 12:40
  • 5
    Well, using vertical lines in tables is not recommended, especially with booktabs – user31729 Oct 9 '17 at 12:41
  • 6
    The manual says even more ``Never, ever use vertical rules''. – Denis Oct 9 '17 at 12:45
  • OK it's even in the first paragraph...shame on me ^^ but thanks anyways! – Valentin Oct 10 '17 at 14:23