Importing data from an ASCII file

May 3rd, 2006 andris

First refer to Importing data into SPSS. If you have read it, than you can continue below.
Typically, columns of data in an ASCII file are separated by a space, tab, comma, or some other character. SPSS has a Text Import Wizard that will help you import data in an ASCII file format:

1. Select File -> Open -> Data
2. Choose Text as the File Type if your ASCII file has the .txt extension. Otherwise you could choose the option All files
3. Select the file you want to import and click Open

Importing an ASCII file Open File

4. The next thing that will pop up is the Import text wizard. First click Next if your file does not match a predefined format. It probably doesn’t, so click Next.

Importing an ASCII file step 1

5. In step 2, you can set the first question to Delimited. In the second question you choose wether you have a header row or not (are variables names included in the top of the file). After setting the options right, choose Next.

Importing an ASCII file step 2

6. In step 3, set the line where the first case of your data begins (normally on line 1), set how your cases are represented (normally each line represents a case), and how many cases you want to import (choose for yourself, normally you import All of the cases. Click Next.

Importing an ASCII file step 3

7. In step 4, set the delimiters of your file (probably comma or space). If your text has quotes (or anything else) around it, than specify this. In most cases you can just set it to None. As you can see, based on the choices you make here, SPSS already formats the file in the small screen in the bottom. There you can check if everything is set correctly. Choose Next when it looks fine.

Importing an ASCII file step 4

8. In step 5 you can set the specifications for the variables, but you can just skip it if you have already defined your variables or want to do it later.

Importing an ASCII file step 5

9. In step 6 you can just leave all the options as they are, and click Finish. You’re done!

Importing an ASCII file step 6

Entry Filed under: 1. Getting data into SPSS,Questions and answers

3 Comments

  • 1. SPSSlog.com » Impor&hellip  |  May 3rd, 2006 at 7:10 am

    [...] Importing data from an Excel file Importing data from an ASCII file Importing data from a tab delimited text file [...]

  • 2. hasland  |  January 22nd, 2007 at 4:22 pm

    Actually i am not an active serfer, but this this site is really great, i will spread it through my friends.

  • 3. Bryan  |  June 1st, 2007 at 4:53 pm

    Hey there, I need help creating a data dictionary for SPSS to read. I have a IMPS 4.1 file and data dictionary for some city census data of Rio de Janeiro–had to work like a bugger to create the dictionary for IMPS because the organization that did the survey is kaput.

    I’ve searched the web and have had no luck.

    If you can point me to the format, I will manually transform mine.
    If you can point me to instructions for converting IMPS 4.1 data dictionaries to SPSS, I would be eternally grateful!

    Thanks,

    Bryan


Calendar

May 2006
M T W T F S S
« Apr   Aug »
1234567
891011121314
15161718192021
22232425262728
293031  

Most Recent Posts