Importing labels from Excel into SPSS

Chong Ho Yu, Ph.D.



I have an Excel file in which the first row contains variable names and the second row carries the labels that are more descriptive and informative. How can I import both the short headers and the long labels into SPSS?

Data set with headers and labels




The best way is to use SPSS syntax, of course. But if you are not familiar with scripting in SPSS or you are in a hurry to get things done, the quick and dirty way is to retain the second row in the Excel file as shown below.

Data set with labels only



SPSS disallows space in variable names. When there is space in the header, the import function in SPSS automatically put the description into "Label" (see the green arrow), and at the same time compress the space in the headers and put the compressed text in "Name" (see the red arrow). By default the length of variable names in SPSS is 10, and thus the variable names won't be as long as the label names.

For example, if the description is "School In Phoenix," then the "Name" will be "SchoolInPho" whereas the "Label" will be exactly as what you have in Excel. Therefore, it is advisable that you use meaningful words at the beginning of the labels.

SPSS variable and label list



SAS tips contents

Computer write-ups contents

Simplified Navigation

Table of Contents

Search Engine