Exporting an Access Table to a Text File
You can export an Access database table to a text file using the Export option.
As you can see from figure 11-22, I selected the Employees table and chose file
> Export.
Note: You can also select the Export option by right-clicking on the
table.
Figure 11-22: Exporting the employees table of Northwind.mdb
The next dialog box lets you pick a path and filename you want to export. There
are many export options are available. As you can see from figure 11-23, I
selected the Text files option, left the exported filename as Employees, and
saved the file to the C:\root directory.
Figure 11-23: Selecting a path of exporting file
Now, the Export Text Wizard lets you define the format of the text file. A
dialog box lets you select either delimited or fixed width (see Figure 11-24).
Figure 11-24: Export Text Wizard options
You can also select the Advanced option to set more options (see Figure 11-25).
Figure 11-25: The Advanced option of Export Text Wizard
The next screen lets you pick the delimiter including comma, tab, semicolon,
space, and others. I left the Comma option checked (see Figure 11-26).
Figure 11-26: Delimiter options of Export Text Wizard
I also checked the Include Field Names on first Row check box. This option adds
the first row of the text file as field names.
The last page asks you the filename (see Figure 11-27).
Figure 11-27: Filename page of the Export Text Wizard
Now click the finish button. When the wizard is done exporting, you'll see a
message saying the export is finished. Click OK and close Access.
Now view C:\Employees.txt (see figure 11-28).
Figure 11-28: Exported Employees.txt file from Northwind.mdb