Reading Older Excel Files and Other Spreadsheets

This topic applies to reading Excel 4 or earlier files, Lotus 1-2-3 files and SYLK format spreadsheet files. For information on reading Excel 95 or later files, see the topic Reading Excel Files.

Read variable names. For spreadsheets, you can read variable names from the first row of the file or the first row of the defined range. The values are converted as necessary to create valid variable names, including converting spaces to underscores. For information on variable naming rules, see Variable Names .

Range. For spreadsheet data files, you can also read a range of cells. Use the same method for specifying cell ranges as you would with the spreadsheet application.

How Spreadsheets are Read

  • The data type and width for each variable are determined by the column width and data type of the first data cell in the column. Values of other types are converted to the system-missing value. If the first data cell in the column is blank, the global default data type for the spreadsheet (usually numeric) is used.
  • For numeric variables, blank cells are converted to the system-missing value, indicated by a period. For string variables, a blank is a valid string value, and blank cells are treated as valid string values.
  • If you do not read variable names from the spreadsheet, the column letters (A, B, C, ...) are used for variable names for Excel and Lotus files. For SYLK files and Excel files saved in R1C1 display format, the software uses the column number preceded by the letter C for variable names (C1, C2, C3, ...).