Excel 到 Latex 表格的转换

Excel 到 Latex 表格的转换

我希望得到一些帮助来制作一张类似于照片(照片 1)所示的表格。

由于表格对我来说很复杂,我使用了 excel 到 latex 转换器插件;但我得到了扭曲的结果(见图 2)。以下是插件生成的脚本。

请帮我安排脚本/代码。

\documentclass[11pt]{report}

\usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}
\usepackage{array}
\usepackage{colortbl}
\usepackage{booktabs} 
\usepackage{tabulary}
\usepackage{array,longtable,multirow}
\usepackage{tabularx}
\usepackage{xcolor}
\usepackage{soul} 
\usepackage{mathtools}
\usepackage{titlesec}

\begin{document}

    % Table generated by Excel2LaTeX from sheet 'Sheet1 (2)'
    \begin{table}[htbp]
      \centering
      \caption{Add caption}
        \begin{tabular}{||c|l||c|l||p{11.555em}|c|r||}
        \toprule
        \toprule
        \multicolumn{2}{||c||}{\multirow{2}[4]{*}{\textcolor[rgb]{ 0,  .439,  .753}{\textbf{RIBA Plan of Work 2013}}}} & \multicolumn{2}{c||}{\multirow{2}[4]{*}{\textbf{HOAI 2013 Service Profiles}}} & \multicolumn{3}{p{22.835em}||}{\textcolor[rgb]{ .753,  0,  0}{\textbf{SIA 112 Service Models}}} \\
    \cmidrule{5-7}    \multicolumn{2}{||c||}{} & \multicolumn{2}{c||}{} & \textcolor[rgb]{ .753,  0,  0}{\textbf{Sub-Phases}} & \multicolumn{2}{p{11.28em}||}{\textcolor[rgb]{ .753,  0,  0}{\textbf{Main Phases}}} \\
        \midrule
        \midrule
        \rowcolor[rgb]{ .949,  .949,  .949} \multirow{2}[4]{*}{\textcolor[rgb]{ 0,  .439,  .753}{\textbf{0}}} & \multicolumn{1}{l||}{\multirow{2}[4]{*}{\cellcolor[rgb]{ .867,  .922,  .969}STRATEGIC DEFINITION}} & \multicolumn{1}{c}{\cellcolor[rgb]{ 1,  1,  1}} & \cellcolor[rgb]{ 1,  1,  1} & \cellcolor[rgb]{ .867,  .922,  .969}1.1 Formulation of requirements, solution strategies & \textcolor[rgb]{ .753,  0,  0}{\textbf{1}} & \multicolumn{1}{p{9.835em}||}{\cellcolor[rgb]{ .867,  .922,  .969}STRATEGIC PLANNING} \\
    \cmidrule{5-7}    \rowcolor[rgb]{ .949,  .949,  .949}       &       & \multicolumn{1}{c}{\cellcolor[rgb]{ 1,  1,  1}} & \cellcolor[rgb]{ 1,  1,  1} & \multirow{2}[4]{*}{\cellcolor[rgb]{ .867,  .922,  .969}2.1 Project definition and feasibility studies} & \multirow{4}[8]{*}{\textcolor[rgb]{ .753,  0,  0}{\textbf{2}}} & \multicolumn{1}{r||}{\multirow{4}[8]{*}{\cellcolor[rgb]{ .867,  .922,  .969}PRELIMINARY STUDIES}} \\
    \cmidrule{1-2}    \rowcolor[rgb]{ .949,  .949,  .949} \multirow{3}[6]{*}{\textcolor[rgb]{ 0,  .439,  .753}{\textbf{1}}} & \multicolumn{1}{l||}{\multirow{3}[6]{*}{\cellcolor[rgb]{ .867,  .922,  .969}PREPARATION AND BRIEF}} & \multicolumn{1}{c}{\cellcolor[rgb]{ 1,  1,  1}} & \cellcolor[rgb]{ 1,  1,  1} & \multicolumn{1}{l|}{} &       &  \\
    \cmidrule{5-5}    \rowcolor[rgb]{ .949,  .949,  .949}       &       & \multicolumn{1}{c}{\cellcolor[rgb]{ 1,  1,  1}} & \cellcolor[rgb]{ 1,  1,  1} & \multirow{2}[4]{*}{\cellcolor[rgb]{ .867,  .922,  .969}2.2 Selection process} &       &  \\
    \cmidrule{3-4}    \rowcolor[rgb]{ .949,  .949,  .949}       &       & \multirow{2}[4]{*}{\textbf{1}} & \multicolumn{1}{l||}{\multirow{2}[4]{*}{\cellcolor[rgb]{ .867,  .922,  .969}FUNDAMENTAL EVALUATION}} & \multicolumn{1}{l|}{} &       &  \\
    \cmidrule{1-2}\cmidrule{5-7}    \rowcolor[rgb]{ .949,  .949,  .949} \multirow{2}[4]{*}{\textcolor[rgb]{ 0,  .439,  .753}{\textbf{2}}} & \multicolumn{1}{l||}{\multirow{2}[4]{*}{\cellcolor[rgb]{ 1,  .851,  .4}CONCEPT DESIGN}} &       &       & \multirow{2}[4]{*}{\cellcolor[rgb]{ 1,  .851,  .4}3.1 Preliminary project} & \multirow{6}[10]{*}{\textcolor[rgb]{ .753,  0,  0}{\textbf{3}}} & \multicolumn{1}{r||}{\multirow{6}[10]{*}{\cellcolor[rgb]{ 1,  1,  1}PROJECT PLANNING / CONFIGURATION}} \\
    \cmidrule{3-4}    \rowcolor[rgb]{ .949,  .949,  .949}       &       & \multirow{2}[4]{*}{\textbf{2}} & \multicolumn{1}{l||}{\multirow{2}[4]{*}{\cellcolor[rgb]{ 1,  .851,  .4}PRELIMINARY DESIGN}} & \multicolumn{1}{l|}{} &       &  \\
    \cmidrule{1-2}\cmidrule{5-5}    \rowcolor[rgb]{ .949,  .949,  .949} \multirow{2}[4]{*}{\textcolor[rgb]{ 0,  .439,  .753}{\textbf{3}}} & \multicolumn{1}{l||}{\multirow{2}[4]{*}{\cellcolor[rgb]{ 1,  .851,  .4}DEVELOPED DESIGN}} &       &       & \multirow{2}[4]{*}{\cellcolor[rgb]{ 1,  .851,  .4}3.2 Construction project} &       &  \\
    \cmidrule{3-4}    \rowcolor[rgb]{ .949,  .949,  .949}       &       & \textbf{3} & \multicolumn{1}{p{8.335em}||}{\cellcolor[rgb]{ 1,  .851,  .4}FINAL DESIGN} & \multicolumn{1}{l|}{} &       &  \\
    \cmidrule{1-5}    \rowcolor[rgb]{ .949,  .949,  .949} \multirow{2}[2]{*}{\textcolor[rgb]{ 0,  .439,  .753}{\textbf{4}}} & \cellcolor[rgb]{ 0,  .69,  .314} & \multirow{2}[2]{*}{\textbf{4}} & \multicolumn{1}{l||}{\multirow{2}[2]{*}{\cellcolor[rgb]{ 0,  .69,  .314}PLANNING PERMISSION APPLICATION}} & \multirow{2}[2]{*}{\cellcolor[rgb]{ 0,  .69,  .314}3.3 Approval procedure} &       &  \\
        \rowcolor[rgb]{ .949,  .949,  .949}       & \multicolumn{1}{p{9.165em}||}{\cellcolor[rgb]{ .749,  .561,  0}TECHNICAL DESIGN} &       &       & \multicolumn{1}{l|}{} &       &  \\
        \midrule
        \rowcolor[rgb]{ .949,  .949,  .949} \multirow{3}[4]{*}{\textcolor[rgb]{ 0,  .439,  .753}{\textbf{5}}} & \multicolumn{1}{c||}{\multirow{3}[4]{*}{\cellcolor[rgb]{ 0,  .125,  .376}\textcolor[rgb]{ 1,  1,  1}{CONSTRUCTION}}} & \multirow{2}[2]{*}{\textbf{5}} & \multicolumn{1}{l||}{\multirow{2}[2]{*}{\cellcolor[rgb]{ .749,  .561,  0}EXECUSION PLANNING}} & \multirow{2}[2]{*}{\cellcolor[rgb]{ .8,  .4,  1}4.1 Tender, offer comparison, application for award} & \multirow{2}[2]{*}{\textcolor[rgb]{ .753,  0,  0}{\textbf{4}}} & \multicolumn{1}{r||}{\multirow{2}[2]{*}{\cellcolor[rgb]{ .8,  .4,  1}\textcolor[rgb]{ 1,  1,  1}{CALL FOR TENDER}}} \\
        \rowcolor[rgb]{ .949,  .949,  .949}       &       &       &       & \multicolumn{1}{l|}{} &       &  \\
    \cmidrule{3-7}    \rowcolor[rgb]{ .949,  .949,  .949}       &       & \textbf{6} & \multicolumn{1}{p{8.335em}||}{\cellcolor[rgb]{ .8,  .4,  1}\textcolor[rgb]{ 1,  1,  1}{PREPARATION OF CONTRACT AWARD}} & \cellcolor[rgb]{ .749,  .561,  0}5.1 Construction planning & \multirow{3}[6]{*}{\textcolor[rgb]{ .753,  0,  0}{\textbf{5}}} & \multicolumn{1}{r||}{\multirow{3}[6]{*}{\cellcolor[rgb]{ 1,  1,  1}REALIZATION/ IMPLEMENTATION}} \\
    \cmidrule{1-5}    \rowcolor[rgb]{ .949,  .949,  .949} \multirow{2}[4]{*}{\textcolor[rgb]{ 0,  .439,  .753}{\textbf{6}}} & \multicolumn{1}{l||}{\multirow{2}[4]{*}{\cellcolor[rgb]{ 0,  .125,  .376}\textcolor[rgb]{ 1,  1,  1}{HANDOVER \& CLOSE OUT}}} & \textbf{7} & \multicolumn{1}{p{8.335em}||}{\cellcolor[rgb]{ .8,  .4,  1}\textcolor[rgb]{ 1,  1,  1}{INVOLVEMENT IN CONTRACT AWARD}} & \cellcolor[rgb]{ 0,  .125,  .376}5.2 Execution/ Implementation &       &  \\
    \cmidrule{3-5}    \rowcolor[rgb]{ .949,  .949,  .949}       &       & \textbf{8} & \multicolumn{1}{p{8.335em}||}{\cellcolor[rgb]{ 0,  .125,  .376}\textcolor[rgb]{ 1,  1,  1}{PROJECT SUPERVISION}} & \cellcolor[rgb]{ 0,  .125,  .376}5.3 Commissioning, completion &       &  \\
        \midrule
        \rowcolor[rgb]{ .949,  .949,  .949} \multirow{3}[6]{*}{\textcolor[rgb]{ 0,  .439,  .753}{\textbf{7}}} & \multicolumn{1}{l||}{\multirow{3}[6]{*}{\cellcolor[rgb]{ .4,  .6,  0}\textcolor[rgb]{ 1,  1,  1}{IN USE}}} & \multirow{3}[6]{*}{\textbf{9}} & \multicolumn{1}{l||}{\multirow{3}[6]{*}{\cellcolor[rgb]{ .4,  .6,  0}\textcolor[rgb]{ 1,  1,  1}{POST-COMPLETION SERVICES}}} & \cellcolor[rgb]{ .4,  .6,  0}6.1 Operation & \multirow{3}[6]{*}{\textcolor[rgb]{ .753,  0,  0}{\textbf{6}}} & \multicolumn{1}{r||}{\multirow{3}[6]{*}{\cellcolor[rgb]{ .4,  .6,  0}\textcolor[rgb]{ 1,  1,  1}{MANAGEMENT}}} \\
    \cmidrule{5-5}    \rowcolor[rgb]{ .949,  .949,  .949}       &       &       &       & \cellcolor[rgb]{ .4,  .6,  0}6.2 Supervision/ inspection / repair &       &  \\
    \cmidrule{5-5}    \rowcolor[rgb]{ .949,  .949,  .949}       &       &       &       & \cellcolor[rgb]{ .4,  .6,  0}6.3 Maintenance &       &  \\
        \bottomrule
        \bottomrule
        \end{tabular}%
      \label{tab:addlabel}%
    \end{table}%

\end{document}

在此处输入图片描述

在此处输入图片描述

相关内容