READNAMES subcommand (GET DATA command)
The READNAMES
subcommand specifies the row in your Excel file from which the
Get Data
command starts reading data. You can either set the starting row as
variable names or as data.
- ON
- Read the values in the first row of the sheet as variable names. This is the default.See the following example.
READNAMES
is set as ON. So, values in the first row are set as variable names.GET DATA /TYPE=XLS /FILE='/data/sales.xls' /SHEET=name 'June Sales' /CELLRANGE=range 'A1:C3' /READNAMES=ON.
Values that contain invalid characters or do not meet other criteria for variable names are converted to valid variable names. See the topic Variable Names for more information.
- OFF
- Read the first row of the sheet or specified range as data. Default variable names are assigned,
and all rows are read as data.
Example.
GET DATA /TYPE=XLS /FILE='/data/sales.xls' /SHEET=name 'June Sales' /CELLRANGE=range 'A1:C3' /READNAMES=OFF.