Excel2Latex 表格太宽太长

Excel2Latex 表格太宽太长

我有一个长(36 行)宽(15 列)的 excel 表格,我正在使用 excel2latex。我在调整它的宽度和长度时遇到了问题。我希望表格在接下来的页面中继续(以便调整长度),并且需要调整字母或找到一种让表格在另一页中继续的方法(以便调整宽度)。这可能吗?我正在使用脚注大小。非常感谢您的帮助!示例:

\documentclass{article}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{array}% http://ctan.org/pkg/array
\usepackage{tabularx}%
\usepackage{longtable}
\usepackage{pdflscape}
\usepackage[a4paper]{geometry}
\usepackage{longtable}
\usepackage{float}

\begin{document}
%\begin{sidewaystable}
\begin{landscape}
    %\setlength{tabcolsep}{5pt}
    \footnotesize
    %\begin{small}
 % Table generated by Excel2LaTeX from sheet 'Sheet1'
\begin{table}[htbp]
\centering
\vspace*{-1.5cm}
\caption{example}\\
 \hspace*{-5pt}\begin{tabular}{c{1cm\textwidth}p{5cm\textwidth}p{4cm\textwidth}p{2cm\textwidth}p{1.5cm\textwidth}p{1.5cm\textwidth}p{1.5cm\textwidth}p{1.5cm\textwidth}p{1.5cm\textwidth}p{1.5cm\textwidth}p{1.5cm\textwidth}p{1.5cm\textwidth}p{1.5cm\textwidth}}
    \toprule
    \textbf{xxxx} & \textbf{fffff} & \textbf{uuuuu} & \textbf{zzzz} & \textbf{oooo} & \textbf{nnn} & \textbf{date1} & \textbf{Date2} & \textbf{Date3} & \textbf{Date4} & \textbf{pppp} & \textbf{vvvv} & \textbf{ssss} \\
     \midrule
     No    & 1     & x     & xxx   & Ddddd & Yes   & Nov-07 & Aug-12 & Nov-07 & Aug-12 & 0     &       & yyyyyyyyy \\
     Yes   & 1     & x     & xxxx  & Ddddd & Yes   & Oct-07 & Today & Mar-11 & Today &       &       & yyyyyyyyy \\
     No    & 1     & x     & xxxxxxxxxxxxx & Mmmmmm & Yes   & Jul-08 & Dec-09 & Apr-09 & Dec-09 &       &       &  \\
     Yes   & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Apr-13 & Today & Apr-13 & Today &       &       & yyyyyyyyy \\
     Yes   & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Apr-13 & Today & Apr-13 & Today &       &       & yyyyyyyyy \\
     No    & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & Yes   & Mar-07 & Mar-10 & Mar-07 & Mar-10 &       &       & yyyyyyyyy \\
     Yes   & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm & No    & Jan-08 & Today & -     & -     & 0     & Yes   & yyyyyyyyy \\
     & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm & No    &       &       &       &       &       & Yes   & yyyyyyyyy \\
     Yes   & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & No    & Feb-11 & Today & Feb-11 & Jun-11 & 0     &       & yyyyyyyyy \\
     Yes   & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & No    & Jan-07 & Today & -     & -     & 0     & Yes   &  \\
     & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & No    &       &       &       &       &       & Yes   &  \\
     Yes   & 1     & x     &       & Mmmmmm & No    & Jan-07 & Today & -     & -     &       & Yes   & yyyyyyyyy \\
     Yes   & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm & No    & Apr-02 & Today & -     & -     &       & Yes   & yyyyyyyyy \\
     & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm &       &       &       &       &       &       & Yes   &  \\
     & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm &       &       &       &       &       &       & Yes   &  \\
     & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm &       &       &       &       &       &       & Yes   &  \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Oct-06 & Dec-11 & Oct-06 & Dec-11 &       &       & yyyyyyyyy \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & Yes   & Jan-04 & Jun-13 & Jan-04 & Jun-13 &       &       & yyyyyyyyy \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Oct-05 & Jun-13 & Oct-05 & Jun-13 &       &       & yyyyyyyyy \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Jan-12 & Dec-13 & Jan-12 & Dec-13 &       &       & yyyyyyyyy \\
     Yes   & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Jan-80 & Today & Jan-80 & Today &       &       & yyyyyyyyy \\
     Yes   & 2     & x     & xxxxxxxxxxxxxxx & Mommmmm & Yes   & Feb-03 & Today & Feb-03 & Today & 0     &       & yyyyyyyyy \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   &       & Apr-12 &       & Apr-12 & 0     &       &  \\
     Yes   & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Oct-05 & Today & Oct-05 & Today & 0     &       & yyyyyyyyy \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmm & Yes   & Jan-75 & Dec-13 & Jan-75 & Dec-13 & 0     &       & yyyyyyyyy \\
     Yes   & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Jul-13 & Today & Jul-13 & Today &       &       & yyyyyyyyy \\
     No    & 2     & x     &       & Mmmmm & Yes   & Jan-68 & Mar-08 & Jan-68 & Mar-08 &       &       & yyyyyyyyy \\
     No    & 2     & x     &       & Mmmmm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     &       & Mm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     &       & Mmm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     &       & Mmmmmm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmmm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     &       & Mmm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     &       & Mmmmmm & Yes   & May-11 & Oct-15 & May-11 & Oct-15 &       &       & yyyyyyyyy \\
     \bottomrule
\end{tabular}\hspace*{-5pt}%
\label{tab:addlabel}%
\end{table}%
%\end{small}
%\end{sidewaystable}
\end{landscape}
\end{document}

以 Salim 为例:

 \documentclass{article}
  \usepackage{booktabs}
  \usepackage{multirow}
 \usepackage{array}% http://ctan.org/pkg/array
 \usepackage{tabularx}%
 \usepackage{longtable}
 \usepackage{pdflscape}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage{longtable}
\usepackage{float}

\begin{document}
%\begin{sidewaystable}
\begin{landscape}
    % Table generated by Excel2LaTeX from sheet 'Sheet1'
    \begin{table}[htbp]
        %\footnotesize
        \centering
        \vspace*{-1.5cm}
        \caption{example}
        \hspace*{-5pt}\begin{tabular}{p{1cm}p{1cm}p{1cm}p{3cm}p{2cm}p{0.8cm}p{1.2cm}p{1.2cm}p{1.2cm}p{1.5cm}p{1cm}p{1cm}p{1.5cm}}
            \toprule
            \textbf{xxxx} & \textbf{fffff} & \textbf{uuuuu} & \textbf{zzzz} & \textbf{oooo} & \textbf{nnn} & \textbf{date1} & \textbf{Date2} & \textbf{Date3} & \textbf{Date4} & \textbf{pppp} & \textbf{vvvv} & \textbf{ssss} \\
        \midrule
        No    & 1     & x     & xxx   & dddd  & Yes   & Nov-07 & Aug-12 & Nov-07 & Aug-12 & 0     &       & yyyyyyyyy \\
        Yes   & 1     & x     & xxxx  & ddddd & Yes   & Oct-07 & Today & Mar-11 & Today &       &       & yyyyyyyyy \\
        No    & 1     & x     & xxxxxxxxxxxxx & mmmmmm & Yes   & Jul-08 & Dec-09 & Apr-09 & Dec-09 &       &       &  \\
        Yes   & 1     & x     & xxxxxxxxxxxxxxx & mmmmmm & Yes   & Apr-13 & Today & Apr-13 & Today &       &       & yyyyyyyyy \\
        Yes   & 1     & x     & xxxxxxxxxxxxxxx & mmmmmm & Yes   & Apr-13 & Today & Apr-13 & Today &       &       & yyyyyyyyy \\
        No    & 1     & x     & xxxxxxxxxxxxxxx & mmmmmm & Yes   & Mar-07 & Mar-10 & Mar-07 & Mar-10 &       &       & A ball is a round, usually spherical but sometimes ovoid, object with various uses. It is used in ball games, where the play of the game follows the state of the ball as it is hit, kicked or thrown by players. In the context of sports, "ball" need not refer to a spherical object, as is the case in American football. Balls can also be used for simpler activities, such as catch, marbles and juggling. Balls made from hard-wearing materials are used in engineering applications to provide very low friction bearings, known as ball bearings. Black-powder weapons use stone and metal balls as p \\
        Yes   & 1     & x     & xxxxxxxxxxxxxxx & mmmmmm & No    & Jan-08 & Today & -     & -     & 0     & Yes   & yyyyyyyyy \\
        & 1     & x     & xxxxxxxxxxxxxxx & mmmmmm & No    &       &       &       &       &       & Yes   & yyyyyyyyy \\
        Yes   & 1     & x     & xxxxxxxxxxxxxxx & mmmmmm & No    & Feb-11 & Today & Feb-11 & Jun-11 & 0     &       & yyyyyyyyy \\
        Yes   & 1     & x     & xxxxxxxxxxxxxxx & mmmmmm & No    & Jan-07 & Today & -     & -     & 0     & Yes   &  \\
        & 1     & x     & xxxxxxxxxxxxxxx & mmmmmm & No    &       &       &       &       &       & Yes   &  \\
        Yes   & 1     & x     &       & mmmmmm & No    & Jan-07 & Today & -     & -     &       & Yes   & yyyyyyyyy \\
        Yes   & 1     & x     & xxxxxxxxxxxxxxx & mmmmmm & No    & Apr-02 & Today & -     & -     &       & Yes   & yyyyyyyyy \\
        & 1     & x     & xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx & mmmmmm &       &       &       &       &       &       & Yes   &  \\
        & 1     & x     & xxxxxxxxxxxxxxx & mmmmmm &       &       &       &       &       &       & Yes   &  \\
        & 1     & x     & xxxxxxxxxxxxxxx & mmmmmm &       &       &       &       &       &       & Yes   &  \\
        No    & 2     & x     & xxxxxxxxxxxxxxx & mmmmmm & Yes   & Oct-06 & Dec-11 & Oct-06 & Dec-11 &       &       & yyyyyyyyy \\
        No    & 2     & x     & xxxxxxxxxxxxxxx & mmmmmm & Yes   & Jan-04 & Jun-13 & Jan-04 & Jun-13 &       &       & yyyyyyyyy \\
        No    & 2     & x     & A ball is a round, usually spherical but sometimes ovoid, object with various uses. It is used in ball games, where the play of the game follows the state of the ball as it is hit, kicked or thrown by players. In the context of sports, "ball" need not refer to a spherical object, as is the case in American football. Balls can also be used for simpler activities, such as catch, marbles and juggling. Balls made from hard-wearing materials are used in engineering applications to provide very low friction bearings, known as ball bearings. Black-powder weapons use stone and metal balls as p & mmmmmm & Yes   & Oct-05 & Jun-13 & Oct-05 & Jun-13 &       &       & yyyyyyyyy \\
        No    & 2     & x     & xxxxxxxxxxxxxxx & mmmmmm & Yes   & Jan-12 & Dec-13 & Jan-12 & Dec-13 &       &       & yyyyyyyyy \\
        Yes   & 2     & x     & xxxxxxxxxxxxxxx & mmmmmm & Yes   & Jan-80 & Today & Jan-80 & Today &       &       & yyyyyyyyy \\
        Yes   & 2     & x     & xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx & mmmmmm & Yes   & Feb-03 & Today & Feb-03 & Today & 0     &       & yyyyyyyyy \\
        No    & 2     & x     & xxxxxxxxxxxxxxx & mmmmmm & Yes   &       & Apr-12 &       & Apr-12 & 0     &       &  \\
        Yes   & 2     & x     & xxxxxxxxxxxxxxx & mmmmmm & Yes   & Oct-05 & Today & Oct-05 & Today & 0     &       & yyyyyyyyy \\
        No    & 2     & x     & xxxxxxxxxxxxxxx & mmmmmm & Yes   & Jan-75 & Dec-13 & Jan-75 & Dec-13 & 0     &       & yyyyyyyyy \\
        Yes   & 2     & x     & xxxxxxxxxxxxxxx & mmmmmm & Yes   & Jul-13 & Today & Jul-13 & Today &       &       & yyyyyyyyy \\
        No    & 2     & x     &       & mmmmmm & Yes   & Jan-68 & Mar-08 & Jan-68 & Mar-08 &       &       & yyyyyyyyy \\
        No    & 2     & x     &       & mmmmmm &       &       &       &       &       &       &       &  \\
        No    & 2     & x     &       & mmmmmm &       &       &       &       &       &       &       &  \\
        No    & 2     & x     &       & mmmmmm &       &       &       &       &       &       &       &  \\
        No    & 2     & x     &       & mmmmmm &       &       &       &       &       &       &       &  \\
        No    & 2     & x     & xxxxxxxxxxxxxxx & mmmmmm &       &       &       &       &       &       &       &  \\
        No    & 2     & x     & xxxxxxxxxxxxxxx & mmmmmm &       &       &       &       &       &       &       &  \\
        No    & 2     & x     &       & mmmmmm &       &       &       &       &       &       &       &  \\
        No    & 2     & x     &       & mmmmmm & Yes   & May-11 & Oct-15 & May-11 & Oct-15 &       &       & yyyyyyyyy \\
        \bottomrule
        \end{tabular}\hspace*{-5pt}%
        \label{tab:addlabel}%
    \end{table}%
    %\end{sidewaystable}
\end{landscape}
\end{document}

答案1

该工具的问题excel2latex在于通常需要重新制作生成的 LaTeX 表。

在您的情况下,只需使用以下 MWE 中所示的包即可longtable。请注意,我复制了表格行,以获得更长的表格,以获得两页。请参阅和\midrule的定义。用于在表格之外没有空白空间。请查看漂亮的打印表格代码(这样您可以更好地看到缺失值等)。\firstendhead\endhead@{}

梅威瑟:

\documentclass{article}

\usepackage[a4paper,showframe]{geometry}

\usepackage{booktabs}
\usepackage{pdflscape}
\usepackage{longtable}

\begin{document}
\begin{landscape}
%\setlength{tabcolsep}{5pt}
\footnotesize
\begin{longtable}{@{}p{1cm}p{1cm}p{1cm}p{3cm}p{2cm}p{0.8cm}p{1.2cm}p{1.2cm}p{1.2cm}p{1.5cm}p{1cm}p{1cm}p{1.5cm}@{}}
\caption{example}\label{tab:addlabel}\\
\toprule
\textbf{xxxx} & \textbf{fffff} & \textbf{uuuuu} & \textbf{zzzz} & \textbf{oooo} & \textbf{nnn} & \textbf{date1} & \textbf{Date2} & \textbf{Date3} & \textbf{Date4} & \textbf{pppp} & \textbf{vvvv} & \textbf{ssss} \\
\midrule
\endfirsthead
\multicolumn{13}{@{}c@{}}{table continued~\dots}\\
\toprule
\textbf{xxxx} & \textbf{fffff} & \textbf{uuuuu} & \textbf{zzzz} & \textbf{oooo} & \textbf{nnn} & \textbf{date1} & \textbf{Date2} & \textbf{Date3} & \textbf{Date4} & \textbf{pppp} & \textbf{vvvv} & \textbf{ssss} \\
\midrule
\endhead
No  & 1     & x     & xxx             & Ddddd   & Yes & Nov-07 & Aug-12 & Nov-07 & Aug-12 & 0     &     & yyyyyyyyy \\
Yes & 1     & x     & xxxx            & Ddddd   & Yes & Oct-07 & Today  & Mar-11 & Today  &       &     & yyyyyyyyy \\
No  & 1     & x     & xxxxxxxxxxxxx   & Mmmmmm  & Yes & Jul-08 & Dec-09 & Apr-09 & Dec-09 &       &     &  \\
Yes & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Apr-13 & Today  & Apr-13 & Today  &       &     & yyyyyyyyy \\
Yes & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Apr-13 & Today  & Apr-13 & Today  &       &     & yyyyyyyyy \\
No  & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & Yes & Mar-07 & Mar-10 & Mar-07 & Mar-10 &       &     & yyyyyyyyy \\
Yes & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & No  & Jan-08 & Today  & -      & -      & 0     & Yes & yyyyyyyyy \\
    & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & No  &        &        &        &        &       & Yes & yyyyyyyyy \\
Yes & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & No  & Feb-11 & Today  & Feb-11 & Jun-11 & 0     &     & yyyyyyyyy \\
Yes & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & No  & Jan-07 & Today  & -      & -      & 0     & Yes &  \\
    & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & No  &        &        &        &        &       & Yes &  \\
Yes & 1     & x     &                 & Mmmmmm  & No  & Jan-07 & Today  & -      & -      &       & Yes & yyyyyyyyy \\
Yes & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & No  & Apr-02 & Today  & -      & -      &       & Yes & yyyyyyyyy \\
    & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  &     &        &        &        &        &       & Yes &  \\
    & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  &     &        &        &        &        &       & Yes &  \\
    & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  &     &        &        &        &        &       & Yes &  \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Oct-06 & Dec-11 & Oct-06 & Dec-11 &       &     & yyyyyyyyy \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & Yes & Jan-04 & Jun-13 & Jan-04 & Jun-13 &       &     & yyyyyyyyy \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Oct-05 & Jun-13 & Oct-05 & Jun-13 &       &     & yyyyyyyyy \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Jan-12 & Dec-13 & Jan-12 & Dec-13 &       &     & yyyyyyyyy \\
Yes & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Jan-80 & Today  & Jan-80 & Today  &       &     & yyyyyyyyy \\
Yes & 2     & x     & xxxxxxxxxxxxxxx & Mommmmm & Yes & Feb-03 & Today  & Feb-03 & Today  & 0     &     & yyyyyyyyy \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes &        & Apr-12 &        & Apr-12 & 0     &     &  \\
Yes & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Oct-05 & Today  & Oct-05 & Today  & 0     &     & yyyyyyyyy \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmm     & Yes & Jan-75 & Dec-13 & Jan-75 & Dec-13 & 0     &     & yyyyyyyyy \\
Yes & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Jul-13 & Today  & Jul-13 & Today  &       &     & yyyyyyyyy \\
No  & 2     & x     &                 & Mmmmm   & Yes & Jan-68 & Mar-08 & Jan-68 & Mar-08 &       &     & yyyyyyyyy \\
No  & 2     & x     &                 & Mmmmm   &     &        &        &        &        &       &     &  \\
No  & 2     & x     &                 & Mm      &     &        &        &        &        &       &     &  \\
No  & 2     & x     &                 & Mmm     &     &        &        &        &        &       &     &  \\
No  & 2     & x     &                 & Mmmmmm  &     &        &        &        &        &       &     &  \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmmm   &     &        &        &        &        &       &     &  \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmm    &     &        &        &        &        &       &     &  \\
No  & 2     & x     &                 & Mmm     &     &        &        &        &        &       &     &  \\
No  & 2     & x     &                 & Mmmmmm  & Yes & May-11 & Oct-15 & May-11 & Oct-15 &       &     & yyyyyyyyy \\
\midrule
No  & 1     & x     & xxxxxxxxxxxxx   & Mmmmmm  & Yes & Jul-08 & Dec-09 & Apr-09 & Dec-09 &       &     &  \\
Yes & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Apr-13 & Today  & Apr-13 & Today  &       &     & yyyyyyyyy \\
Yes & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Apr-13 & Today  & Apr-13 & Today  &       &     & yyyyyyyyy \\
No  & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & Yes & Mar-07 & Mar-10 & Mar-07 & Mar-10 &       &     & yyyyyyyyy \\
Yes & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & No  & Jan-08 & Today  & -      & -      & 0     & Yes & yyyyyyyyy \\
    & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & No  &        &        &        &        &       & Yes & yyyyyyyyy \\
Yes & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & No  & Feb-11 & Today  & Feb-11 & Jun-11 & 0     &     & yyyyyyyyy \\
Yes & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & No  & Jan-07 & Today  & -      & -      & 0     & Yes &  \\
    & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & No  &        &        &        &        &       & Yes &  \\
Yes & 1     & x     &                 & Mmmmmm  & No  & Jan-07 & Today  & -      & -      &       & Yes & yyyyyyyyy \\
Yes & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & No  & Apr-02 & Today  & -      & -      &       & Yes & yyyyyyyyy \\
    & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  &     &        &        &        &        &       & Yes &  \\
    & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  &     &        &        &        &        &       & Yes &  \\
    & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm  &     &        &        &        &        &       & Yes &  \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Oct-06 & Dec-11 & Oct-06 & Dec-11 &       &     & yyyyyyyyy \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & Yes & Jan-04 & Jun-13 & Jan-04 & Jun-13 &       &     & yyyyyyyyy \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Oct-05 & Jun-13 & Oct-05 & Jun-13 &       &     & yyyyyyyyy \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Jan-12 & Dec-13 & Jan-12 & Dec-13 &       &     & yyyyyyyyy \\
Yes & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Jan-80 & Today  & Jan-80 & Today  &       &     & yyyyyyyyy \\
Yes & 2     & x     & xxxxxxxxxxxxxxx & Mommmmm & Yes & Feb-03 & Today  & Feb-03 & Today  & 0     &     & yyyyyyyyy \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes &        & Apr-12 &        & Apr-12 & 0     &     &  \\
Yes & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Oct-05 & Today  & Oct-05 & Today  & 0     &     & yyyyyyyyy \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmm     & Yes & Jan-75 & Dec-13 & Jan-75 & Dec-13 & 0     &     & yyyyyyyyy \\
Yes & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm  & Yes & Jul-13 & Today  & Jul-13 & Today  &       &     & yyyyyyyyy \\
No  & 2     & x     &                 & Mmmmm   & Yes & Jan-68 & Mar-08 & Jan-68 & Mar-08 &       &     & yyyyyyyyy \\
No  & 2     & x     &                 & Mmmmm   &     &        &        &        &        &       &     &  \\
No  & 2     & x     &                 & Mm      &     &        &        &        &        &       &     &  \\
No  & 2     & x     &                 & Mmm     &     &        &        &        &        &       &     &  \\
No  & 2     & x     &                 & Mmmmmm  &     &        &        &        &        &       &     &  \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmmm   &     &        &        &        &        &       &     &  \\
No  & 2     & x     & xxxxxxxxxxxxxxx & Mmmm    &     &        &        &        &        &       &     &  \\
No  & 2     & x     &                 & Mmm     &     &        &        &        &        &       &     &  \\
No  & 2     & x     &                 & Mmmmmm  & Yes & May-11 & Oct-15 & May-11 & Oct-15 &       &     & yyyyyyyyy \\
\bottomrule
\end{longtable}
\end{landscape}
\end{document}

答案2

你想要这样的桌子吗

\documentclass{article}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{array}% http://ctan.org/pkg/array
\usepackage{tabularx}%
\usepackage{longtable}
\usepackage{pdflscape}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage{longtable}
\usepackage{float}

\begin{document}
%\begin{sidewaystable}
\begin{landscape}
   % Table generated by Excel2LaTeX from sheet 'Sheet1'
\begin{table}[htbp]
%\footnotesize
\centering
\vspace*{-1.5cm}
\caption{example}
 \hspace*{-5pt}\begin{tabular}{p{1cm}p{1cm}p{1cm}p{3cm}p{2cm}p{0.8cm}p{1.2cm}p{1.2cm}p{1.2cm}p{1.5cm}p{1cm}p{1cm}p{1.5cm}}
    \toprule
    \textbf{xxxx} & \textbf{fffff} & \textbf{uuuuu} & \textbf{zzzz} & \textbf{oooo} & \textbf{nnn} & \textbf{date1} & \textbf{Date2} & \textbf{Date3} & \textbf{Date4} & \textbf{pppp} & \textbf{vvvv} & \textbf{ssss} \\
     \midrule
     No    & 1     & x     & xxx   & Ddddd & Yes   & Nov-07 & Aug-12 & Nov-07 & Aug-12 & 0     &       & yyyyyyyyy \\
     Yes   & 1     & x     & xxxx  & Ddddd & Yes   & Oct-07 & Today & Mar-11 & Today &       &       & yyyyyyyyy \\
     No    & 1     & x     & xxxxxxxxxxxxx & Mmmmmm & Yes   & Jul-08 & Dec-09 & Apr-09 & Dec-09 &       &       &  \\
     Yes   & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Apr-13 & Today & Apr-13 & Today &       &       & yyyyyyyyy \\
     Yes   & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Apr-13 & Today & Apr-13 & Today &       &       & yyyyyyyyy \\
     No    & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & Yes   & Mar-07 & Mar-10 & Mar-07 & Mar-10 &       &       & yyyyyyyyy \\
     Yes   & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm & No    & Jan-08 & Today & -     & -     & 0     & Yes   & yyyyyyyyy \\
     & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm & No    &       &       &       &       &       & Yes   & yyyyyyyyy \\
     Yes   & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & No    & Feb-11 & Today & Feb-11 & Jun-11 & 0     &       & yyyyyyyyy \\
     Yes   & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & No    & Jan-07 & Today & -     & -     & 0     & Yes   &  \\
     & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & No    &       &       &       &       &       & Yes   &  \\
     Yes   & 1     & x     &       & Mmmmmm & No    & Jan-07 & Today & -     & -     &       & Yes   & yyyyyyyyy \\
     Yes   & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm & No    & Apr-02 & Today & -     & -     &       & Yes   & yyyyyyyyy \\
     & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm &       &       &       &       &       &       & Yes   &  \\
     & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm &       &       &       &       &       &       & Yes   &  \\
     & 1     & x     & xxxxxxxxxxxxxxx & Mmmmmm &       &       &       &       &       &       & Yes   &  \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Oct-06 & Dec-11 & Oct-06 & Dec-11 &       &       & yyyyyyyyy \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmmm & Yes   & Jan-04 & Jun-13 & Jan-04 & Jun-13 &       &       & yyyyyyyyy \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Oct-05 & Jun-13 & Oct-05 & Jun-13 &       &       & yyyyyyyyy \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Jan-12 & Dec-13 & Jan-12 & Dec-13 &       &       & yyyyyyyyy \\
     Yes   & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Jan-80 & Today & Jan-80 & Today &       &       & yyyyyyyyy \\
     Yes   & 2     & x     & xxxxxxxxxxxxxxx & Mommmmm & Yes   & Feb-03 & Today & Feb-03 & Today & 0     &       & yyyyyyyyy \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   &       & Apr-12 &       & Apr-12 & 0     &       &  \\
     Yes   & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Oct-05 & Today & Oct-05 & Today & 0     &       & yyyyyyyyy \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmm & Yes   & Jan-75 & Dec-13 & Jan-75 & Dec-13 & 0     &       & yyyyyyyyy \\
     Yes   & 2     & x     & xxxxxxxxxxxxxxx & Mmmmmm & Yes   & Jul-13 & Today & Jul-13 & Today &       &       & yyyyyyyyy \\
     No    & 2     & x     &       & Mmmmm & Yes   & Jan-68 & Mar-08 & Jan-68 & Mar-08 &       &       & yyyyyyyyy \\
     No    & 2     & x     &       & Mmmmm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     &       & Mm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     &       & Mmm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     &       & Mmmmmm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmmm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     & xxxxxxxxxxxxxxx & Mmmm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     &       & Mmm &       &       &       &       &       &       &       &  \\
     No    & 2     & x     &       & Mmmmmm & Yes   & May-11 & Oct-15 & May-11 & Oct-15 &       &       & yyyyyyyyy \\
     \bottomrule
\end{tabular}\hspace*{-5pt}%
\label{tab:addlabel}%
\end{table}%
%\end{sidewaystable}
\end{landscape}
\end{document}

相关内容