Importing HTML Files

You can import the data in an HTML file so that it becomes exactly like any other Access table; follow these steps to import an HTML file:

1.

Right-click within the Database window and select Import; this opens the Import dialog box.

2.

Use the Files of Type drop-down list to select HTML documents.

3.

Select the HTML file that you want to import and click Import to open the Import HTML Wizard. This wizard is almost identical to the Link HTML Wizard.

4.

In the wizard's first step, you indicate whether the first row of data contains column headings. You can also see Access's proposed layout for the imported table.

5.

Click Advanced to designate specifics about the imported table. The Import Specification dialog box opens. Here you can select which fields you want to include in the imported table, date delimiters, and other specifics of the imported file. Make your selections and click OK.

6.

Click Next to go to the next step. Here, you have the choice of importing the data into a new table or adding it to an existing table. Make your selection and click Next.

7.

In the next step, select a field name and data type for each field in the HTML file. You can also designate whether you want Access to create an index for the field and even whether you want to exclude the field entirely. Make your selections and click Next.

8.

Next, the wizard lets you designate a primary key for the imported table. If you prefer, you can have Access supply the primary key (see Figure 20.7). Make your selection and click Next.

Figure 20.7. Designating a primary key for your new table.

9.

In the wizard's last step, supply a table name for the linked table. If you're concerned about whether the imported table is normalized, you can have Access launch the Table Analyzer after the import is finished. Make your selections and click Finish.

10.

You then see a message that the table imported successfully; it appears in the Database window just as any other Access table does.