In SPSS, is it possible to export a dataset file to .CSV with the value names instead of the value numbers?
Asked Answered
S

3

8

In my SPSS file, I have a variable called "X". It has four values: 1="dog", 2="cat", 3="hyena", 4="parrot".

If I export my data to a .CSV file, here's what it looks like:

X
1
2
3
4

I want the exported .CSV to look like this:

X
dog
cat
hyena
parrot

is this possible?

Sieber answered 28/12, 2012 at 22:26 Comment(0)
M
13

Yes, it is possible (at least in SPSS 20). In File Menu, choose, "Save As...", in the drop down menu in the dialog box that opens choose "Save as type: 'Comma delimited (*.csv)')", and underneath that select "Save value labels where defined instead of data values" (or hit "Alt-a") and choose "Save".

Modicum answered 28/12, 2012 at 23:18 Comment(2)
That's a feature that I really like in SPSS. For "spreadsheet" type of work, and basic exploratory data analysis, SPSS is really great (2^125 times better than Excel), though I'm not so big on its statistical analysis abilities.Modicum
You might like XLStat then... puts a lot of basic exploratory analysis close at hand in Excel, and also has some surprisingly advanced features. I got it because it was one of the only reasonably-priced tools I could find that could perform rake/rim weighting, but I find now I use it a lot for basic histograms and stuff like that.Why
C
15

The other answers relate to the GUI, but some people prefer using the syntax editor. If you fall into that category, from the programming perspective, you can do something like:

SAVE TRANSLATE OUTFILE='path\to\file.csv'
  /TYPE=CSV
  /MAP
  /REPLACE
  /FIELDNAMES
  /CELLS=LABELS.

Notice the last line, /CELLS=LABELS. -- If you wanted the values instead, you can change it to (surprise!) /CELLS=VALUES.

Caducity answered 29/12, 2012 at 9:21 Comment(0)
M
13

Yes, it is possible (at least in SPSS 20). In File Menu, choose, "Save As...", in the drop down menu in the dialog box that opens choose "Save as type: 'Comma delimited (*.csv)')", and underneath that select "Save value labels where defined instead of data values" (or hit "Alt-a") and choose "Save".

Modicum answered 28/12, 2012 at 23:18 Comment(2)
That's a feature that I really like in SPSS. For "spreadsheet" type of work, and basic exploratory data analysis, SPSS is really great (2^125 times better than Excel), though I'm not so big on its statistical analysis abilities.Modicum
You might like XLStat then... puts a lot of basic exploratory analysis close at hand in Excel, and also has some surprisingly advanced features. I got it because it was one of the only reasonably-priced tools I could find that could perform rake/rim weighting, but I find now I use it a lot for basic histograms and stuff like that.Why
W
3

In my version of SPSS (17), the save window has a checkbox for "Save value labels where defined instead of data values", which will save the accompanying labels rather than numerical values.

Why answered 28/12, 2012 at 23:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.