New Commands in AutoCAD 2005: Part 3
Table Styles & Exports
by Ralph Grabowski
Introduction
This month, we look at the final set of command related to tables introduced
by AutoCAD 2005: TableStyle, MatchCell,
and TableExport.
TableStyle - creates styles that define the look of
the table, much like text styles.
MatchCell - copies the properties of one cell, and
applies them to other cells.
TableExport - exports the selected table as an ASCII-format
CSV file for import into other programs.
Finding the Commands
TableStyle Command
To start the the TableStyle command:
• From the Format menu, select Table
Style.
• Double-click the table; in the Properties window, select Table
Style.
• At the command prompt, enter the tablestyle
command.
• Alternatively, type the ts shortcut.
In all cases, AutoCAD displays the Table Style dialog box.
MatchCell Command
To start the the MatchCell command:
• At the command prompt, enter the matchcell
command.
• Alternatively, select a cell in a table, right-click, and select
Match Cell from the shortcut menu.
In both cases, AutoCAD prompts you at the command line.
TableExport Command
To start the the TableExport command:
• At the command prompt, enter the tableexport
command.
• Alternatively, select a table, right-click, and select Export
from the shortcut menu.
Step-by-Step Tutorials
TableStyle Command
To create or modify a table style, follow these steps:
1. Start the TableStyle command. Notice the Table
Style dialog box. You can create a new style (based on a current style)
or modify the current style.

Figure 1: The Table Style dialog box.
2. For this tutorial, click Modify. Notice the new
dialog box with three tabs, one each for Data, Column Heads, and Title.
The three tab contain similar options, but are specific to the three
kinds of cells: title cells, column head cells, and regular data cells.

Figure 2: Modifying the table style.
Modify the table style in two places: the default text style, and
the fill color. As you make changes, notice that the preview window
updates to reflect.
3. To change the look of the text, you must modify the text style. Click
the ... button to the right of Text Style. Notice the
Text Style dialog box.
Change the font to "Arial." Click Apply,
and then click Close.
4. To change the cell's background color, click the drop list next to
Fill Color. Select "Yellow."
5. Click OK to exit the dialog box.
Click Close to exit the first dialog box.
6. Because you modified the Standard style, the changes apply automatically
to all tables drawn with that style.

Figure 3: Table with the modified table style.
TIPs: You can copy table styles from other drawings
using DesignCenter (AdCenter command). Table styles can be dragged onto
the Tool Palette for instant access and easy application.
MatchCell Command
The MatchCell command is designed to apply local overrides to cells
in tables. The command copies the properties of a single cell, and then
allows you to apply the properties to other cells that you select. Follow
these steps:
1. Create a table, and then make a change to one of the cells. For
example, move the text to the upper-right corner of its cell. (Select
the cell, right-click, and then select Cell Alignment | Upper
Right from the shortcut menu.)
Figure 4: Changing the property of a cell.
2. Select the cell you just modified. Right-click, and then from the
shortcut menu select Match Cell. Notice that the cursor
changes to a paintbrush. (This command is supposed to copy all properties,
but seems to fail at some, such as text formatting.)

Figure 5: "Painting" cells with the copied properties.
3. On the command line, AutoCAD prompts you:
Select destination cell: (Pick another cell.)
Select the cells, one at a time, for which you wish the properties applied.
Notice that the cells change as you select them.
TIP: The MatchProp command copies
the properties of the table (including its style), and applies them
to other tables.
TableExport Command
The TableExport command allows you to use the table
data in other applications. The table is exported in CSV format (short
for "comma-separated values"). This format places each table
row in a single line, with the data from each cell separated by a comma,
as illustrated below:
"Table Heading",
, , ,
"Column A","Column B","Column C","Column
D","Column E"
"1234","2345","346","4567","56890"
This format is read by almost any spreadsheet or database program.
All table formatting is lost. If a cell contains a block, its name is
shown by this format:
Block:NameOfBlock
In this tutorial, you export a table, and then import the CSV file
into a spreadsheet.
1. Continue from the table you created in the previous tutorial.
Select a table: (Pick the
table.)
AutoCAD displays the Export Data dialog box.
2. Enter a file name, and select the folder in which to store the CSV
file.
Click Save.
3. Switch to a spreadsheet program. (The import process may vary, depending
on the brand of spreadsheet program you use.)
From the File menu, select Open.
In the Open dialog box, select the .csv file. If you are fortunate,
your spreadsheet program will recognize the comma-separated values format,
and prompt you with a dialog box illustrated here.

Figure 6: Importing the CSV file into the OpenOffice spreadsheet.
4. Click OK. The file is imported, and should vaguely
resemble the original you created in AutoCAD.
Figure 7: The AutoCAD table data in the spreadsheet file.
TIP: You can bring the spreadsheet back into AutoCAD:
copy the cells with Ctrl+C, and then use the PasteSpec
command in AutoCAD. You may need to try the different formats listed
in the Paste Special dialog box to find one that works best.
|