Latex provides a lot of macro packages for drawing tables (see: http://tug.org/pracjourn/2007-1/mori/), but it is not intuitive to draw a table in Latex, especially when the table is large, Sometimes you need to use Excel and other software first to deal with the data, so often need to convert Excel and other forms into latex code. The Excel plugin Excel2latex this functionality.
Excel2latex can support Excel 2010, below is an example of how to use Excel 2010.
Because Excel2latex is a macro, you should first confirm that you have not selected to disable all macros in the file-options-Trust Center-Trust Center Settings-Macro settings, and then change the settings if they are disabled. Then, in the files-options-add-ons-Manage Add-ons tab, click Browse, load the downloaded Excel2latex.xla file, and tick OK.
If you do not see an Add-on tab on the Excel panel as shown below, check add-ons under the file-options-Customize Ribbon-Main tab.
When the above import Excel2latex is successful, it can be used directly. Open the table where you want to convert the Latex code, select the table content point "Convert table to Latex" and the following dialog box will appear:
There are three main options:
Whether to generate a floating table environment;
Whether to use a three-wire table booktabs, this form is quite concise and beautiful, in the scientific and technical documentation is very common, but after the tick remember to insert the form of the Tex file in the introduction area of \usepackage{booktabs};
Whether to escape the $^_\ symbol, these are the symbols that have specific functions in the general Tex document;
The actual table often needs to insert mathematical formulas, such as the insertion of Greek letters and $\pm$, such as publicity, then do not tick escape. With the use of Excel's combined text function concatenate it is easy to make a table with formulas. Of course, directly before and after the tabular environment add $ can also be the entire table as a mathematical model, but all the letters in the table will make italic Italian body, whether good-looking on the personal hobby.
After setting the "Copy to the Clipboard" can be copied to the clipboard paste directly in the Tex file, you can also select in the box to the right, click "Export All" can export the table Tex file, and then use the \input command to insert the table:
\begin{center}\input{文件名}\end{center}
Note: If the table has Chinese, export Tex file should pay attention to Tex file encoding format, the default ANSI format will make Chinese garbled, with a text editor to UTF-8 format can display normal.
Of course, the export form of Tex files can be modified according to the actual needs, such as the table title, label, etc., for the longer table, you need to display the cross-page longtable environment, you need to set various header footer.
The OpenOffice.org table is also calc2latex by a similar plugin, which appears to be available in the LibreOffice table, but the time limit has not yet been tested.
Reprinted from Http://my.oschina.net/u/1037903/blog/224114?p=1
Export latex code from Excel table