|
Document 285
How to import Excel tables
Version: 3.x, 4.x, 5.x - Scientific WorkPlace, Scientific Word, &
Scientific Notebook
You can import Excel tables to your document using several methods, which are
described here in order of preference. Make sure the method you choose is
appropriate for the MacKichan Software product you have installed.
Method 1: Import information converted from Excel to LaTeX
with Excel2LaTeX
For Scientific WorkPlace, Scientific Word, & Scientific Notebook
The Excel2LaTeX Version 2.0 package, written by Joachim Marder, converts Excel
selections to LaTeX using tabular environments, maintaining most formatting.
You can import the converted tables into your document. Please note that the
Excel2LaTeX package is an external program that is not maintained by MacKichan
Software.
-
Obtain the package:
-
Download the Excel2LaTeX Version 2.0 archive file
xl2latex.zip
to your local hard disk.
-
Extract the files in the archive file.
-
Install the package in your version of Excel according to the instructions in
readme.txt.
The installation creates a Convert Table to LaTeX toolbar with a single button
and places a similar command on the Tools menu.
-
Convert an Excel table to LaTeX:
-
Open your Excel spreadsheet and select a portion of the spreadsheet
-
Choose the Convert Table to LaTeX button or command.
-
Follow the displayed instructions to send the selection to the clipboard or
save it as a LaTeX file. (In SNB, saving as LaTeX file is the only option.)
-
Import the table to SWP, SW, or SNB:
-
In SWP, SW, or SNB, open the file to which you want to import the table.
-
Place the insertion point where you want the table to appear.
-
If you have copied the table to the clipboard (SWP and SW),
-
From the Insert menu, choose
Typeset Object and then choose
TeX Field.
-
Press Ctrl+v to insert the converted table in LaTeX form.
-
Choose OK.
-
Save, close, and reopen your document.
-
Locate the table in your document and edit as necessary.
or
If you have saved the table as a LaTeX file (SWP, SW, and SNB),
-
From the File menu, choose
Import Contents.
-
Specify the LaTeX table file and choose Open.
-
Edit the table as necessary.
Method 2: Import an Excel table as a graphic
You can insert an Excel table into a document as an inline graphic. In SWP and
SW, the graphic can also reside in a table environment that floats.
For Scientific WorkPlace & Scientific Word
-
In Excel, format the table as you want it to appear in your document.
-
Select the table and copy it to the clipboard.
-
In SWP or SW, place the insertion point where you want the table to appear.
-
From the Edit menu, choose
Paste Special,
select Picture, and choose
OK.
The program inserts a graphic image of the Excel table.
-
If you want the graphic to appear inline or displayed,
-
Select the graphic and choose Properties.
-
In the Placement area of the
Layout tab sheet, choose
In Line or
Displayed.
-
If you want the graphic to appear in a floating environment, so that it can
have an automatically numbered title,
-
Select the graphic and choose Properties.
-
In the Placement area of the
Layout tab sheet, choose
In Line.
NoteThe
other graphic placements will interfere with the table environment and will
cause a LaTeX error.
-
In Versions 3.5x and later, import the "Table - (4x3, floating)" fragment.
or
In Version 3.0, import the "table4_3" fragment.
-
Select the graphic and place it inside the fragment, replacing the sample
table that was introduced with the fragment.
-
In the caption TeX field, replace the words
Table Caption with the title you want for the table
and choose OK.
Special procedures are required if the caption
contains mathematics.
-
Save your file.
For Scientific Notebook
-
In Excel, format the table as you want it to appear in your document.
-
Select the table and copy it to the clipboard.
-
In SNB, place the insertion point where you want the table to appear.
-
From the Edit menu, choose
Paste Special,
select Picture, and choose
OK.
The program inserts a graphic image of the Excel table.
-
Select the graphic and choose Properties.
-
In the Placement area of the
Layout tab sheet, choose
In Line or
Displayed.
-
Save your file.
Method 3: Import information from Excel via Word and RTF
For Scientific WorkPlace, Scientific Word, & Scientific Notebook
This method takes advantage of the way Microsoft Word saves Excel tables as
RTF files. Note, however, that because the conversion can alter the table
formatting, this method should be used with caution. After you import the RTF
files into your document, you may need to correct column widths and alignment
specifications. Other editing may also be necessary. Check the content and
appearance of the imported table carefully.
-
In Excel, select the table and copy it to the clipboard.
-
In Microsoft Word,
-
Create a new blank document.
-
Paste the table into the new document.
-
From the File menu, choose
Save As.
-
Change the Save as type to Rich Text Format
(*.rtf).
-
Enter a file name and directory.
-
Choose OK.
-
In SWP, SW, or SNB:
-
Place the insertion point where you want the table to appear.
-
From the File menu, choose
Import Contents.
-
Change the Files of type to RTF (*.rtf).
-
Select the .rtf file containing the table and choose
Open.
The program imports the contents of the file. The converted Excel table may
have set column widths. The table cells will appear as TeX fields.
-
Change the column widths to automatic widths:
-
Select the table.
-
From the Edit menu, choose
Properties, and choose the
Column Width tab.
-
Check the box next to Use Automatic Width and
choose OK.
-
Remove any TeX fields containing alignment commands, such as
\raggedleft or
\raggedright.
-
Save your file.
Last revised 09/14/07
This document was created with Scientific WorkPlace.
|