This guide page will walk you through the steps involved in loading an excel file into SPSS while creating a Syntax file. It will use the following file EXAMPLE.XLSX which is saved in the directory: C\SPSSDATA
Open SPSS by double clicking on the SPSS icon on your computer.
You will see the following a dialog box akin to this one:
From the menu ribbon at the top of the data window, click: File, Open, Data
You should get a dialogue window similar to this one (obviously, not identical)
Notice that the default file type is SPSS Statistics (*.sav). All SPSS Statistics data files have the extension .sav.
Because we want to load an excel file, we need to change the file type by clicking the down arrow or the right and then making the correct selection. Now the dialog box looks like the one below:
Next we need to go to the directory where the excel file is stored. The file that we are going to open is: Example.xlsx which is in the directory: C\SPSSDATA as shown below:
Place the cursor on the file name EXAMPLE.xlsx and then click the second button on the right labeled Paste. You should be able to see the following dialog box
If you don't see the dialog box, but get an error saying, (2003) All sheets in Excel file appear to be empty
, then see IBM's Support for "(2003) All sheets in Excel file appear to be empty" message when reading Excel file into SPSS via File->Open->Data
Click OK.
You should get the syntax file window shown below
Click File, Save As to get the following dialog window
Click Save. You have successfully created a syntax file EXAMPLE.sps and are ready to use it. Notice that the file name now appears at the top of the syntax file window
Next, highlight the text in the syntax window and click the green arrow to run it.
The data file is now open in SPSS.
From the data window, click File, Save AS and then provide the file name EXAMPLE and paste the command to your syntax file. Your syntax file now has the following commands:
From the data file Select: Analyze, Descriptive Statistics, Frequencies
Select Age and Status as shown below
Click Paste. Your syntax now is as follows…