hi all,
I'm trying to export some tables to Excel in order to prepare a powerpoint report. Then I would like to hyperlink the excel tables to the powerpoint: my goal is completely automate the report. The point is the of course spss table dimension can vary if a new code is added (I will launch the report every quarter), and this could compromise the links betwwen Excel and Powerpoint. Any idea about managing spss output in order to have something more stable? This is an example of the synthax I was thinking of: * Export Output. OUTPUT EXPORT /CONTENTS EXPORT=VISIBLE LAYERS=VISIBLE MODELVIEWS=VISIBLE /XLS DOCUMENTFILE='C:\Users\ME\Desktop\report.xls' OPERATION=MODIFYSHEET SHEET='freq' LOCATION=STARTCELL('a10') NOTESCAPTIONS=NO. |
You could use OMS to either export individual tables to individual xls files or use OMS to control what gets piped to the output before exporting the entire output. So even if you add a few lines of code you could suppress that and the tables should still be exported in the same locations.
|
I can't export individual tables to individual xls becuase it's really a lot of tables.
I use the OMS in order to leave only the tables in the output. The problems is a new item in a varible is added: so for instance the table will have 3 rows instead of 2. I was wondering if there is a system to export data with a fixed matrix, for istance 3X3, so the table manteins the same dimension in the future quarter in spite of changes in the variable. |
That is not an exporting problem, that is a problem with generating the table to begin with in SPSS. It has come up a few times on the forum how to make sure zero cells for rows/columns are populated for some tables (e.g. CROSSTABS and CTABLES) - without specific examples I'm not sure what other advice to give.
|
In reply to this post by progster
If you are using CTABLES, you can force
empty cells to appear by making sure that all variable values have a value
label. AUTORECODE has a similar capability. Of course, if new
values appear, you can't squeeze the table dimensions down Procrusteanly.
Beyond that, you could use some Python code and/or the STATS TABLE
CALC extension command to fill in absent rows or columns.
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: progster <[hidden email]> To: [hidden email] Date: 12/12/2014 01:40 AM Subject: Re: [SPSSX-L] best way to export spss output Sent by: "SPSSX(r) Discussion" <[hidden email]> I can't export individual tables to individual xls becuase it's really a lot of tables. I use the OMS in order to leave only the tables in the output. The problems is a new item in a varible is added: so for instance the table will have 3 rows instead of 2. I was wondering if there is a system to export data with a fixed matrix, for istance 3X3, so the table manteins the same dimension in the future quarter in spite of changes in the variable. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/best-way-to-export-spss-output-tp5728155p5728158.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
you can however create dummy "reserved for future use" values among your value labels, and then have CTables print those 0 row/columns. Obviously those would need to be edited when the future use comes, but that's a small edit and can be put at the top of the syntax or in a data preparation step syntax for easy access.
On Dec 12, 2014, at 8:37 AM, Jon K Peck wrote: If you are using CTABLES, you can force empty cells to appear by making sure that all variable values have a value label. AUTORECODE has a similar capability. Of course, if new values appear, you can't squeeze the table dimensions down Procrusteanly. Beyond that, you could use some Python code and/or the STATS TABLE CALC extension command to fill in absent rows or columns. |
Administrator
|
In reply to this post by progster
Maybe time to bone up on your VBA?
What you are doing is brittle and ultimately unstable! May the devil have pity on whoever must maintain it in whatever circle of hell ;-) http://msdn.microsoft.com/en-us/library/office/ff743835%28v=office.15%29.aspx
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by Jon K Peck
I think I found the solution to what I meant, here I'm posting a very simply example.
Portugal, Q3 and Q4 do not appear in the data but they do in the table. DATA LIST LIST / Country Quarter . BEGIN DATA. 1 1 2 1 2 2 END DATA. LIST. val lab country 1 "UK" 2 "Spain" 3 "Portugal". val lab quarter 1 "1Q" 2 "2Q" 3 "3Q" 4 "4Q". * Custom Tables. CTABLES /VLABELS VARIABLES=Country quarter DISPLAY=LABEL /TABLE Country [C][COUNT F40.0, COLPCT.COUNT PCT40.1] BY quarter /CATEGORIES VARIABLES=Country ORDER=A KEY=VALUE EMPTY=INCLUDE /CATEGORIES VARIABLES=quarter ORDER=A KEY=VALUE EMPTY=INCLUDE. If you have better ideas, feel free to improve it. PS: I agree that it's an unstable solution, but I can't still manage VBA |
Free forum by Nabble | Edit this page |