FIELDNAMES Subcommand (SAVE TRANSLATE command)
FIELDNAMES
writes variable names to the first row in spreadsheets and tab-delimited
and comma-delimited text files.
- By default, variable names are not included in the file.
- For Excel files, version 8 or later, you can also select to write either variable names or variable labels.
- VALUE=NAMES
- Writes variable names. This setting is the default setting if
FIELDNAMES
is used without aVALUE
keyword. - VALUE=LABELS
- Writes variable labels. If a variable does not have a defined variable label, the variable name is used.
Example
SAVE TRANSLATE OUTFILE='/data/csvfile.csv' /TYPE=CSV /FIELDNAMES.