Hello fellow data scientists
I seek help with the SPSSINC PROCESS FILES- I have a massive amount of SAV files that I need to convert to XLSX files.
I am following the example provided in the SPSS-X discussion (
split file. Export to Excel with split variables as filename.
Nabble |
remove preview |
 |
split file. Export to Excel with split variables as filename. |
split file. Export to Excel with split variables as filename. I have been looking at SPSSX-l on my phone but have a hard time reading the results. I have the impression there are SPSSINC ways to do... |
View this on Nabble > |
|
|
):
* save subsets of cases to SAV files.
SPSSINC SPLIT DATASET SPLITVAR=city_code
/OUTPUT DIRECTORY= "C:\temp\final\original" DELETECONTENTS=NO
/OPTIONS NAMES=values PRINTLIST=YES
FILELIST="C:\temp\final\original\list new".
* Bring back in each SAV with a subset of cases then save it as an Excel XLSX spreadsheet.
define !input () !quote(!concat(!unquote(!eval(!JOB_OUTPUTDATADIR)), !unquote(!eval(!JOB_DATAFILEROOT)), ".sav")) !enddefine.
Xdefine !out () !quote(!concat(!unquote(!eval(!JOB_OUTPUTDATADIR)), !unquote(!eval(!JOB_DATAFILEROOT)), ".xlsx")) !enddefine.
SPSSINC PROCESS FILES
SYNTAX ="C:\temp\final\SPSS sav to xlsx.sps"
INPUTDATA="C:\temp\final\original"
OUTPUTDATADIR="C:\temp\final"
LOGFILE="C:\temp\final\original\LOG PROCESS FILES.TXT"
CLOSEDATA=YES.
the SPS file inserted is:
GET
FILE=!input.
SAVE TRANSLATE OUTFILE=!out
/TYPE=XLS
/VERSION=12
/MAP
/FIELDNAMES VALUE=NAMES
/CELLS=VALUES
/REPLACE.
*****************
This example does not function and can not process the SAV files to XLSX files.
Does someone know how to take such an issue? maybe the define !input or !out are wrong?
thanks!
------------------------------
Meni Berger
------------------------------
#SPSSStatistics