3.4 Tabular Data
Dreamweaver 4 can import, export, sort, and
format tabular data as described in the following sections.
3.4.1 Importing and Exporting Tabular Data
Use File Import Import Tabular
Data or the Insert Tabular Data icon on the Objects panel to import
and format
tabular data from a text file. Entries
should be delimited by tabs, commas, semicolons, colons, or another
delimiting character. The Import Table Data dialog box, shown
in Figure 3-15, has the settings listed in Table 3-3.
Table 3-3. Import Table Data dialog box options
Data File
|
Selects any file from the local hard drive or network.
|
Delimiter
|
Identifies the column delimiter in the file to be imported: Tab (the
default), Comma, Semicolon, Colon, or Other.
|
Table Width
|
Sets the width of the overall table. The Fit to Data option adjusts
the size of the table to the information being imported; the Set
option sets the width to a fixed pixel size or as a percentage of the
browser window.
|
Cell Padding
|
Sets the margin, in pixels, between the border of the cell and the
cell contents.
|
Cell Spacing
|
Sets the amount of space, in pixels, between adjacent cells.
|
Format Top Row
|
Specifies formatting for the top row of the table (i.e., column
headings). The options are No Formatting, Bold, Italic, or Bold
Italic.
|
Border
|
Sets the width, in pixels, of the border around the table.
|
Dreamweaver can also export data from an HTML table. To export a text
file containing table data:
Select a table in the Document window.
Choose File Export Export Table.
Choose the Delimiter (Tab, Space, Comma, Semicolon, or Colon) to use
to separate items in the exported data.
Choose a Line Break style appropriate to the platform for which you
are exporting the file (Windows, Macintosh, or Unix).
Specify the name of the text file to contain the tabular data.
Click OK to export the data.
3.4.2 Formatting and Sorting Tabular Data
You may want to sort of format tabular data to make it more
comprehensible or useful to the reader. You must use Standard view to
sort and format tabular data (these operations are disabled in Layout
view). To format a table, select the table and then use
Commands Format Table to open the
Format Table dialog box shown in Figure 3-16. You can choose from the predefined colors
schemes or create your own.
To sort the data in a table, select the table and then choose
Command Sort Table to open the
Sort
Table dialog box, whose options are explained in Table 3-4.
Table 3-4. Table sorting options
Sort By
|
Choose a column to sort the table by.
|
Order
|
Choose either Alphabetically or Numerically. (Alphabetical sorting
sorts numbers as 1, 11, 12, 2, 21, 22, 3, 4, 5, etc.)
|
Ascending/Descending
|
Select either an Ascending (A. . .Z, 1 . . .100) or Descending (Z ..
.A, 100. . .1) sort order.
|
Then By
|
Specify a second column to sort by when multiple rows have the same
value in the Sort By column.
|
Sort Includes First Row
|
If the table includes a row of column headings, leave this option
disabled.
|
Keep TR Attributes with Sorted Row
|
If enabled, row formatting is kept with the data, not the original
row number, if a row of data moves.
|
|