Re: Use pivot tables from output as new input
Posted by
drfg2008 on
May 15, 2011; 4:24pm
URL: http://spssx-discussion.165.s1.nabble.com/Use-pivot-tables-from-output-as-new-input-tp4397439p4397954.html
Why don't you simply use python (within SPSS)? With python (running within SPSS Syntax) you can easily read in your table results. This is how the syntax looks like (german version SPSS17):
BEGIN PROGRAM.
import spss,spssaux
spss.Submit("GET FILE='C:/<path>/file.sav'.")
cmd="DESCRIPTIVES VARIABLES=Schicht,Geschlecht,Alter,Bewertung."
desc_table,errcode=spssaux.CreateXMLOutput(
cmd,
omsid="Descriptives")
meansal=spssaux.GetValuesFromXMLWorkspace(
desc_table,
tableSubtype="Descriptive Statistics",
rowCategory="Bewertung",
colCategory="Mittelwert",
cellAttrib="text")
if meansal:
print "Der Mittelwert von Bewertung ist: ", meansal[0]
END PROGRAM.
You simply have to tell the programm the row and the column of the table. That's it!
Frank
Dr. Frank Gaeth