I want to read/input the body of a table from a separate file. I have mostly solved this problem using this question.

But when I try to read a table with multicolumn from a separate file, it failed.
The following is an example.

%main.tex
\documentclass{article}
\usepackage{filecontents,catchfile}
\begin{filecontents*}{table.tex}
%table.tex
    \hline
    A &amp; B  &amp; C &amp; D  \\   \hline
    E &amp; \multicolumn{3}{l|}{This is generated by excel2latex macro. I want to let it auto wrap according to the width of (B+C+D) }   \\      \hline

\end{filecontents*}

\begin{document}

Table test.

\section{Insert a full table}

    \begin{tabular}{|p{2cm}|p{2cm}|p{2cm}|p{2cm}|}
    \hline
    A &amp; B  &amp; C &amp; D  \\   \hline
    E &amp; \multicolumn{3}{p{6cm}|}{This is generated by excel2latex macro. I want to let it auto wrap according to the width of (B+C+D) }   \\      \hline
    \end{tabular}%

\section{ Input the body of table from a separate file}

\CatchFileDef{\mytable}{table.tex}{}% table.tex &gt; \mytable
    \begin{tabular}{|p{2cm}|p{2cm}|p{2cm}|p{2cm}|}
  \mytable
    \end{tabular}%

\end{document}


I just don't want to manually define the width in the body of table because it is generated automatically.


Question: Importing data from an XLS File using ADO and Delphi
Answer: I am guessing you have a majority of columns that may appear to be numeric, but also some that are pure text. 

ADO effectively ignores the column type when importing an Excel. Instead, it guesses the column types, as stated in this MSDN link:


  A Caution about Mixed Data Types
  
  As stated previously, ADO must guess at the data type for each column
  in your Excel worksheet or range. (This is not affected by Excel cell
  formatting settings.) A serious problem can arise if you have numeric
  values mixed with text values in the same column. Both the Jet and the
  ODBC Provider return the data of the majority type, but return NULL
  (empty) values for the minority data type. If the two types are
  equally mixed in the column, the provider chooses numeric over text.


One way to load all fields as strings is to use the IMEX extended property in your connection string like following:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx;
Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=1";


Setting IMEX to 1 makes ADO treat all columns as text, as stated in following ConnectionStrings page:


  Use this one [IMEX=1] when you want to treat all data in the file as text,
  overriding Excels column type "General" to guess what type of data is
  in the column.


You can find more information about the IMEX property in this SO question.

Update: The field data type retrieved using this would be ftWideString.