Intermediate Dreamweaver

Basic HTML | Site management | Assets | Library of Page Elements| Find and Replace | Templates | Style Sheets | Forms | Imagemaps | Mouseovers | Flash buttons & text | Frames | Tables: Formatting & Sorting | Preview Browsers | Font Lists | Colors | Automating Tasks | Pasting in a Script

Table Tricks

Inserting Tabular Data

There is a simple way to get data from an Excel spreadsheet into a Dreamweaver file without any Microsoft Office settings getting into your document.

In Excel, you can open a spreadsheet and then choose Save As from the File menu, then choose Text, Tab Delimited from the Type box, and give the new file a name ending .txt.

To insert the data:

  1. Go to the Insert menu and choose Table Objects. From the submenu, choose Import Tabular Data.
  2. Enter the name/path to the tabular data file in the Data File box. You can use the Browse button to select it from the directory listings.
  3. Select a delimiter. For most files it will be Tab, though Comma, Semicolon and others can be used.
  4. Set the table width, cell padding & spacing and border properties.
  5. Click OK.

Colors/formatting

Dreamweaver includes a number of predesigned formats (with color combinations) for Tables.

Name Number
Jenne 83072
   
Name Number
Help 84357
Jenne 83072
Name Number
Help 84357
Circulation 83070
CS 83990
Jenne 83072

To use table formatting, click in your table then, from the Command menu, choose Format Table.

Format Table window

  • First, choose a table format from the selection box. When you click on one of the formats, an example of a table in that format will be displayed next to the table box.
  • Then, you can adjust the colors and formatting.
  • Row Colors covers the color of the regular rows (not the top row). Choose a color for the First row (and the Second Row, if you are alternating) by entering the color name or RGB color value, or clicking on the color box to get the palette. Set the Alternating scheme to none, or every other or every 2, 3, or 4 rows.
  • Top Row settings let you set the alignment, text style, background and text color of the top row.
  • Left Col lets you set the alignment and text style of the leftmost column of the table.
  • You can also change the border here.
  • You can have it apply the attributes to each particular cell by clicking the "Apply all Atributes to TD tags.." block. If you do this, and the table is rearranged, the attributes will stick with the cells, not the rows.

Note that any changes you make to the table after you have set the formatting will not automatically continue the formatting, especially if you tell it to apply attributes to TD tags (individual cells).

Sorting Content of a Table

Dreamweaver will sort the contents of a table for you, as long as it is a reasonably simple table (you will have to remove the column tags from a table exported from Excel, for instance). Click in the table and, from the Commands menu, choose Sort Table.

Sort Table Window

You can sort by any particular row, in alphabetical or numerical order, either ascending or descending. You can also sort by a second row within the regular sort. If you have already set a formatting for the table, you probably want to select Keep all row colors the same. If the table doesn't include a header or footer row, or you want to sort those anyway, click the boxes for each. Then click OK to sort.

    Carrots 25 pounds Veggies
    Bananas 1 case Fruit
    Beef 15 pounds Protein
    Celery 10 bunches Veggies
    Cheese 25 pounds Protein
    Eggs 30 dozen Protein
    Oranges 1 case Fruit
    Bananas 1 case Fruit
    Oranges 1 case Fruit
    Beef 15 pounds Protein
    Cheese 25 pounds Protein
    Eggs 30 dozen Protein
    Carrots 25 pounds Veggies
    Celery 10 bunches Veggies

 

February 10, 2004