2.2 Data Import

(PSY206) Data Management and Analysis

Author

Md Rasel Biswas

Importing Excel Data Files into SPSS

  • Suppose we have an Excel file vote.xlsx (download) containing data like the following:


Steps to Import an Excel File

  1. Open SPSS and go to File > Open > Data.
  2. A new window will appear asking you to select the File Type.
  3. Choose Excel (.xls, .xlsx) from the drop-down menu.
  4. Browse to the folder where the file is saved and select your file.
  5. Click Open.
  6. A new window will appear as shown below:


Selecting Data from the File

  • In the import dialog box:
    • Select the appropriate worksheet (if the Excel file has multiple sheets).
    • By default, SPSS imports the entire sheet.
    • To import only a portion of the data, specify a Range (e.g., A1:B6).

Example: To import only the variables ID and Gender from the first 6 rows, enter A1:B6 in the Range field.

Practice

Reflection Question

  • What are the advantages of importing a .sav file instead of an Excel file?
    (Hint: Consider variable names, labels, formats, and missing value handling.)

Importing Other Software Data (Stata, SAS, etc.)

  • Besides Excel, SPSS can directly open datasets created in other statistical software such as:
    • Stata (.dta)
    • SAS (.sas7bdat)
    • SPSS portable files (.por)

This feature is useful when collaborating with researchers who use different software.


General Steps

  1. Go to File > Open > Data.
  2. From the File Type drop-down list, choose the relevant format (e.g., Stata, SAS).
  3. Browse to the folder where the dataset is saved.
  4. Select the file and click Open.
  5. The dataset will appear in SPSS with variable names, labels, and some metadata preserved.

Practice

  • Try importing a dataset from another software, e.g.,

Summary

  • Excel files: Good for raw data entry and sharing, but limited in metadata.
  • Stata / SAS files: Retain more metadata and are useful for collaboration.
  • SPSS (.sav): Native format with full compatibility (best for long-term work).