|
Hi all with Sax Basic it is/was
possible to add a specific Tablelooks to a table in the viewer (e.g.
objPivotTable.TableLook = <Sting path and filename> ). Is there a possibility to do
something similar with Python? I am using SPSS 18. TIA. Christian **********************************
Christian Schmidhauser,
Dr.phil.II |
|
Hi Christian (Dr. Schmidhauser),
To answer your question about Python: If you check the scripting PDF that comes with SPSS (Im using v17 and it came with) called "SPSS Statistics Scripting Guide" it gives some insight on how this can be done (appears to be relatively simple). You can find this guide by opening up SPSS and selecting it under "help>programmability>scripting" it should open the pdf guide for you. On page 92 there is a reference for "SetTableLook Method". Once you locate on your PC where the .stt file is (the file containing the table-look parameters) you should just be able to reference and it effectively change the table to whatever you want. SetTableLook Method You will need to "import SpssClient" for this to work. If you need a more specific example or additional help on this let me know. HTH J. R. Carroll Grad. Student in Pre-Doc Psychology at CSUS Research Assistant for Just About Everyone. Email: [hidden email] -or- [hidden email] Phone: (916) 628-4204 On Mon, Aug 23, 2010 at 3:26 AM, la volta statistics <[hidden email]> wrote:
|
|
Hi Justin Thanks that
helped HTH Christian BEGIN PROGRAM. import SpssClient SpssClient.StartClient() OutputDoc =
SpssClient.GetDesignatedOutputDoc() OutputItems =
OutputDoc.GetOutputItems() i =
OutputItems.Size() #counts the items zero-based for index in
range(i-1,0,-1): OutputItem =
OutputItems.GetItemAt(index) if
OutputItem.GetType() == SpssClient.OutputItemType.PIVOT: PivotTable
= OutputItem.GetSpecificType()
PivotTable.SetTableLook("C:\Programme\SPSSInc\PASWStatistics18\Looks\Academic.stt") break SpssClient.StopClient() END PROGRAM. **********************************
Christian
Schmidhauser, Dr.phil.II Von: Justin Carroll
[mailto:[hidden email]] Hi Christian (Dr.
Schmidhauser),
On Mon, Aug 23, 2010 at 3:26 AM, la volta statistics <[hidden email]> wrote: Hi all with Sax Basic it is/was possible to add a specific Tablelooks
to a table in the viewer (e.g. objPivotTable.TableLook = <Sting path and
filename> ). Is there a possibility to do something similar with Python? I am
using SPSS 18. TIA. Christian ********************************** Christian Schmidhauser, Dr.phil.II |
|
In reply to this post by J. R. Carroll
Note that if you don't want to write a script, you can apply a specific tableLook to a pivot table with the SPSSINC MODIFY TABLES extension command. (Under the covers the command is using the same scripting api to do this.) Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
Hi Christian (Dr. Schmidhauser), To answer your question about Python: If you check the scripting PDF that comes with SPSS (Im using v17 and it came with) called "SPSS Statistics Scripting Guide" it gives some insight on how this can be done (appears to be relatively simple). You can find this guide by opening up SPSS and selecting it under "help>programmability>scripting" it should open the pdf guide for you. On page 92 there is a reference for "SetTableLook Method". Once you locate on your PC where the .stt file is (the file containing the table-look parameters) you should just be able to reference and it effectively change the table to whatever you want. SetTableLook Method Applies a predefined table look. Syntax objSpssPivotTable.SetTableLook(filename) Parameters "filename" Path to the TableLook (.stt) file You will need to "import SpssClient" for this to work. If you need a more specific example or additional help on this let me know. HTH J. R. Carroll Grad. Student in Pre-Doc Psychology at CSUS Research Assistant for Just About Everyone. Email: jrc.csus@... -or- jrcarroll@... Phone: (916) 628-4204 On Mon, Aug 23, 2010 at 3:26 AM, la volta statistics <schmidhauser@...> wrote: Hi all
with Sax Basic it is/was possible to add a specific Tablelooks to a table in the viewer (e.g. objPivotTable.TableLook = <Sting path and filename> ).
Is there a possibility to do something similar with Python? I am using SPSS 18.
TIA. Christian
********************************** Christian Schmidhauser, Dr.phil.II
|
| Free forum by Nabble | Edit this page |
