Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

How to convert Excel tables to LaTeX and insert them into a ..., Slides of MS Microsoft Excel skills

Open Excel. Click on the Microsoft Symbol in the upper left hand corner, then “Excel Options” at the bottom of the pop-up window. In.

Typology: Slides

2021/2022

Uploaded on 09/27/2022

heathl
heathl 🇺🇸

4.5

(11)

237 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
How to convert Excel tables to LaTeX and insert
them into a LaTeX document
Klaus Moeltner
1 Downloading and activating “Excel2LaTeX”
1. Go to http://www.ctan.org/tex-archive/support/excel2latex/.
2. Right-click on Excel2LaTeX.xla towards the bottom of the page
and select “save link as”.
3. Copy the file to your Microsoft Office Addins folder. On my PC, the
path is
C:\\Program Files (x86)\Microsoft Office\Office12\ADDINS
4. Open Excel. Click on the Microsoft Symbol in the upper left hand
corner, then “Excel Options” at the bottom of the pop-up window. In
the “options” window, select “Addins”. Make sure Excel2LaTeX.xla
is shown as “activated”, else click on “manage Excel addins” at the
bottom and activate the addin.
5. Close and re-open Excel. You should now see an “Addins” tab in the
top menu bar. It has 2 sub-options. You will need only the first one
titled “Convert table to latex”.
2 Conversion steps
Create a table in Excel like you usually would. See the example posted on
this web page titled “HHbasics”, a table with basic sample demographics
that is customary in many empirical papers.
1. Select all cells of the table
2. open the “addins” tab, click on “Convert table to latex”.
1
pf3
pf4
pf5

Partial preview of the text

Download How to convert Excel tables to LaTeX and insert them into a ... and more Slides MS Microsoft Excel skills in PDF only on Docsity!

How to convert Excel tables to LaTeX and insert

them into a LaTeX document

Klaus Moeltner

1 Downloading and activating “Excel2LaTeX”

1. Go to http://www.ctan.org/tex-archive/support/excel2latex/.

2. Right-click on “Excel2LaTeX.xla” towards the bottom of the page

and select “save link as”.

3. Copy the file to your Microsoft Office Addins folder. On my PC, the

path is

C:\Program Files (x86)\Microsoft Office\Office12\ADDINS

4. Open Excel. Click on the Microsoft Symbol in the upper left hand

corner, then “Excel Options” at the bottom of the pop-up window. In

the “options” window, select “Addins”. Make sure Excel2LaTeX.xla

is shown as “activated”, else click on “manage Excel addins” at the

bottom and activate the addin.

5. Close and re-open Excel. You should now see an “Addins” tab in the

top menu bar. It has 2 sub-options. You will need only the first one

titled “Convert table to latex”.

2 Conversion steps

Create a table in Excel like you usually would. See the example posted on

this web page titled “HHbasics”, a table with basic sample demographics

that is customary in many empirical papers.

1. Select all cells of the table

2. open the “addins” tab, click on “Convert table to latex”.

3. Click on “browse” and select your destination folder. Make sure this

is the exact same folder where your main Tex document that will call

the table is located.

4. Type a file name (here I chose “HHbasics”), and make sure “Tex doc-

uments” is shown in the “save as type” bar.

5. Click on “save” (browser window will close) and “save to file” in the

addins window.

3 Cleaning steps

Open the file in TeXnicCenter. Do the following:

1. Make sure the midrule is in the correct place (as shown in the original

Excel table), else move it. You usually do not have to change the top

and bottom rule.

2. Wedge any math symbols (such as >, <, etc.) between dollar symbols,

so they will compile correctly.

3. insert a “\” prior to any percentage symbols, if applicable, as in: %

4. Make any other cosmetic changes as needed

5. save the file

4 Inserting the table

The following shows the most flexible way to insert tables, with annotations

(only visible in LaTeX file). First vertically, as is customary, than sideways

on a new page (handy for larger tables):

Table 2: Basic Home Characteristics

Home feature

Mean

Std

Min

Max

age in 2007 (years)

lot size (1000 sqft)

home size (1000 sqft)

number of bedrooms

number of bathrooms

taxable value (1000s)

fraction of even addresses

number of homes

This table includes all premises for which a full set of home char-acteristics was available (92% of the full 2007 sample)Std = standard deviation, Min = minimujm, Max = maximum

5 Final notes:

Excel2LaTeX is surprisingly flexible. It can handle relatively complex tables,

for example with merged cells and centered text, empty columns between

text and so on. However, sometimes it will be necessary to “manually”

change the width of each column so that the table fits on a page.

This can be accomplished by first converting the Excel table as usual,

then editing the Tex file. For an example, see the “Table with schedule”

file in the Syllabus section of our course web page. Note that you need to

change the table environment from “table” to “tabularx” for flexibility with

column width. Then add specific width measures for each column.

Once the table Tex file is so modified, calling / inserting the table into

the main document proceeds as usual.