Importing from a Text File in Access 2007

Microsoft Access Add comments

Text files are the lowest common denominator for data exchange. If you’re using a program that creates files Access can’t import, then plain text may be your only avenue.

Once again, you start by choosing your file, and then choosing how you want to add the information to your database. Then, the Import wizard takes you through a few more steps:

  1. Specify the type of text file.

    Access can import from two types of text files:

    • Delimited text files use some sort of separator to indicate where each field ends. For example, Joe, Piscapone, 43 is a line of text you may find in a delimited text fileit’s three field values separated by commas.

    • Fixed-width text files separates a record into separate fields by position. Each field has a certain number of characters allocated to it, and if you don’t use them all up, then Access fills the remaining space (up until the next field) with space characters.


    Note: Delimited text files are more common and more flexible than fixed-width text files (because they can accommodate data values of vastly different lengths).

  2. Click Next.

    If you’re importing delimited text, Access asks you what character’s the delimiterin other words, what character separates the fields (Figure 10-7). Commas and tabs are common delimiters.

    If you’re importing fixed-width text, Access lets you set the field boundaries by dragging column lines to the right position in the preview window.

  3. Complete the wizard.

    The rest of the wizard unfolds in exactly the same way as it does for Excel data.

    If you’re creating a new table to hold your imported data, then the next step asks you to configure the fields you want to create by setting their names, data types, and indexing options (Figure 10-6). Once you’ve finished this part, you can choose whether or not you want Access to create an autonumbered ID field, and then use it as the primary key.


    Figure 10-7. In this example, fields are separated using tabs.

    Finally, in the last step, you need to enter the name of the table you want to create or add to. You can then click Finish (and, optionally, choose to save your import steps for later reuse).

Popularity: 14% [?]

Related Post

  • Importing Data in Access 2007
  • Import and Export Operations in Access 2007
  • Case for Importing and Exporting in Access 2007
  • Importable File Types in Access 2007
  • Importing from an Excel File in Access 2007
  • Don't Find What You're Looking For? Please Try Here...

    Google
     

    3 Responses to “Importing from a Text File in Access 2007”

    1. Don Edwards Says:

      What this article does not cover is that a file is not permitted to be a text file if it doesn’t have a Microsoft-approved extension for text files.

      My biggest complaint about Office 2007 is that it’s *even worse than previous versions* at “we know what you want and mean better than you do”.

    2. кpacaвицaвocтoкa Says:

      Ну вы подеритесь еще, тоже мне спорщики :)

    3. гpycтный Says:

      Большое спасибо, пост действительно толково написан и по делу, есть что почерпнуть.

    Leave a Reply

    WP Theme & Icons by N.Design Studio
    Entries RSS Comments RSS Add to Technorati Favorites Log in