Skip to content

Instantly share code, notes, and snippets.

Last active October 31, 2021 23:49
  • Star 16 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Using PSPP to convert sav files to csv

#Converting SPSS files to csv with PSPP#

Install and open PSPP Use the File menu to open your file (it probably has a .sav extension) Go to File>New>Syntax to open PSPP's command line window


  /OUTFILE="path/newcsvfile.csv"  //location for your new file
  /FIELDNAMES       //optional command to insert fieldnames in the top row
  /CELLS=LABELS.     //optional command specifying to export "labels" from the SPSS codebook (e.g. excellent). Change "labels" to "values" for value reponses (e.g. "5" for "excellent")


Copy link

I used your code (TY) to convert the NSSE files from sav to csv, however, now there are multiple problems and I am not sure if I can trust the conversion. Several columns that were numbers came in as custom columns and changed to dates. Other columns came in with a number, with the value label, and both, and some, the digit in sav file was converted to a word in the csv such as 1, one. Any suggestions?
Thank you.

Copy link

xlxs4 commented May 11, 2021

Sorry to jump in on this, but you can follow something like this, and export to .csv from within Excel (and I would guess OpenOffice, etc.)

Copy link

Thanks @xlxs4 and sorry @RobotimusPrimed. I really have no idea what could be causing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment