Importing ASCII Data
Mainframes and minicomputers often export data in the ASCII file format. When you import ASCII data, you often need to make some changes for Access to handle the data properly.
Import ASCII Data into Access
To import ASCII data into Access, follow these steps:
- Open the database into which you want to import a table.
- With Tables selected in the list of object types, right-click anywhere in the Navigation Pane and select Import from the context menu. (Alternatively, you can select Text File from the Import & Link group on the External Data tab of the Ribbon.) A flyout menu appears.
- Select Text File from the flyout menu. The Get External Data - Text File dialog appears.
- Click Browse to locate the file you want to import.
- Indicate how and where you want to store the data in the current database and click OK. This launches the Import Text Wizard.
- Select Delimited or Fixed Width, to designate the format of the file you want to import. Click Next.
- Indicate the delimiter that separates your fields (for instance, comma), the text qualifier, select or deselect First Row Contains Field Names, as appropriate, and then click Next. The wizard appears.
- Type the field name in the Field Name text box.
- Select whether you want Access to create an index for the field.
- Change the data type, if desired.
- Repeat steps 8-10, as appropriate, and then click Next.
- If your data has a column that is appropriate for the primary key, select Choose My Own Primary Key. Otherwise, select Let Access Add Primary Key.
- If you opted to choose your own primary key, select the field from the drop-down box that you want Access to use as the primary key, and then click Next.
- Type the table name in the Import to Table text box.
- Click Finish, and then click OK.
When working with ASCII data, you should be aware of a few things that can save you lots of time and effort in working with the imported data, as follows:
- After you import a table, you should open it and view its data. You might want to modify some of the field types to make them the appropriate Access data types. For example, the table you imported from might not have had a currency type.
- You can click the Advanced button anytime in the wizard to change the import specifications for each field.
In this tutorial:
- Sharing Data with Other Applications
- What Is External Data?
- Looking at Supported File Formats
- Exporting to an Excel Spreadsheet
- Exporting to ASCII
- Importing from Another Access Database
- Importing ASCII Data
- Linking to Tables in Another Access Database
- Linking to Another Type of Database
- Linking to SQL Server Databases
- The Linked Table Manager