Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
While it is perfectly acceptable to create tables and populate them with data yourself in Dreamweaver, it's not always the fastest way to get your data into your pages. If your table already exists in a Word or Excel document, you can simply import that file directly into Dreamweaver. Dreamweaver builds the table structure from the available data, leaving you to add any of the accessibility features or additional structure your table may require. It's the fastest, most efficient way to get data into Dreamweaver and into a table.
Now if you working on a windows machine, you can use the Import Word or Import Excel Document option to import straight from that program. On the Mac, you need to first save the file out as a comma, or tab-delimited file and then use the import tabular data option. Since import tabular data lets you import delimited files regardless of the program that they are originated from, we will use that method to bring our file into Dreamweaver. So here I have the tours_details_bigsur_ trails.htm file from the Tours folder.
This is the file that we are going to be using for the remainder of the chapter and it's a really long name. So I will probably just refer to it as the Trails file from this point forward. I am going to scroll down the page, and here we can see a list that includes the difficulty ratings for the hikes on our trails. Just below that is where we are going to import our table. So go ahead and place your cursor on a line blinking just below the list. You want to make sure you are still inside that mainArticle div tag. Now to import our table on the page, we are going to go up to the menu and we are going to go to File > Import > Tabular Data.
Now you will notice on my interface I also see the options for importing a Word or Excel document. If you are on a Mac, you are not going to see those. So it's a safe bet that you can bring on a comma or a tab-delimited file. So you could just use Word or Excel to go ahead and create that type of file and you will be fine. So I am going to say Import > Tabular Data and the first thing it's going to want to is browse out and find the files. So I am just going to hit Browse. So you want to browse to the 11_02 folder and go in the assets directory.
Now in the assets directory you are going to find an Excel spreadsheet and a text file. The text file is a tab-delimited file that has already been exported from the Excel spreadsheet. If you wanted to experiment bringing in the Excel spreadsheet, you can do that as well. I am going to click Open, and from the Delimiter type, I am going to choose Tab. Now if you're given this file from someone else, and they didn't tell you which one they were using, my advice will be to start with Tab and then afterwards try Comma. I mean there really aren't that many choices.
So you can pretty much just go down the list and you would be in good shape. Now after this, we have some very limited formatting options for the table that we are about to bring in. You will notice that this in no way gives us the same amount of choices that we had when we placed our table on the page earlier. So, for Table width, we are just going to have it fit to the data. For Cell spacing, padding and border, we are going to type in zero , and for formatting top row we are going to choose No formatting. Now the options there would be Bold, Italic, and Bold and Italic, which is pretty common for headers but we are going to be controlling that visual formatting through styles so we really don't want to do it through this dialog box.
I am going to go ahead and click OK and my table has been imported on the page. Now with the table selected, I am going to switch over to Code View, making sure I am looking at the source code, and we can see that we have brought in a very basic table in terms of its structure. There is a table tag, our table row tag, and additional table row tags. You will notice for example that the top row is not made up of table headers or
So we don't have those types of options as we are importing tabular data. We have to make those changes manually. They are not that hard to do however. I am going to switch back over to the Design View and I am going to highlight the first row. So Trail Name, Type, Length, Path, Elevation, and Rating. If I look down at my Properties Inspector, in addition to the regular HTML and CSS properties that I am used to seeing, I also see a section for the table row that I have highlighted. One of my options is to make everything within that table row a header cell.
I am going to go ahead and click that checkbox and now those are
Now we are going to style it later but before we get to that, we are going to explore what we can do to help make this table more accessible.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 98529 Viewers
56 Video lessons · 48230 Viewers
61 Video lessons · 85819 Viewers
56 Video lessons · 102030 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.