Reading Data from Spreadsheets
Rather than typing all of your data directly into the Data Editor, you can read data from applications such as Microsoft Excel. You can also read column headings as variable names.
- From the menus choose:
- Select Excel (*.xls) as the file type you want to view.
- Open demo.xls. See the topic Sample Files for more information.
The Opening Excel Data Source dialog box is displayed, allowing you to specify whether variable names are to be included in the spreadsheet, as well as the cells that you want to import. In Excel 95 or later, you can also specify which worksheets you want to import.
- Make sure that Read
variable names from the first row of data is selected.
This option reads column headings as variable names.
If the column headings do not conform to the IBM® SPSS® Statistics variable-naming rules, they are converted into valid variable names and the original column headings are saved as variable labels. If you want to import only a portion of the spreadsheet, specify the range of cells to be imported in the Range text box.
- Click OK to read the Excel file.
The data now appear in the Data Editor, with the column headings used as variable names. Since variable names can't contain spaces, the spaces from the original column headings have been removed. For example, Marital status in the Excel file becomes the variable Maritalstatus. The original column heading is retained as a variable label.
