I'm looking for a spss script that takes individual tables from output viewer and exports to a new sheet everytime, in the same excel file.
I used to have one that worked in version 12 or 13, but have since mislaid it,
thanks for any help,
This topic has been locked.
Pinned topic exporting to excel
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
SystemAdmin 110000D4XK445 Posts
Re: exporting to excel2012-11-16T13:37:41ZThis is the accepted answer. This is the accepted answer.There are two possible solutions for this. The SPSSINC MODIFY OUTPUT extension command includes a plugin function that will export the specified items to Excel. If you have the Python Essentials installed, you can see how to use this by looking at the comments in the file customoutputfunctions.py.
Here is one example from that file:
* Export all the custom tables in the Viewer to separate sheets named table1, table2, ... SPSSINC MODIFY OUTPUT TABLES /IF SUBTYPE= "'Custom Table'" PROCESS=ALL /CUSTOM FUNCTION= "customoutputfunctions.excelexport(file='c:/temp/extest.xls', sheet= 'table#',action= 'CreateWorksheet') ".
Another but less flexible solution is the ExportTablesToExcelFiles package in the Utilities Collection on the SPSS Community site.