Modify Output Extension - Export to multiple Excel sheets not working

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Modify Output Extension - Export to multiple Excel sheets not working

tbur
Hello, I searched this forum to find how to export multiple SPSS output
tables to separate sheets in Excel.  I found the Modify Output Extension
bundle & installed that, but the syntax I found on this forum is not working
for me.
I am using SPSS v24.0.0.0 and installed Python when I installed SPSS.  
Here is the syntax I used and the warning message received:

SPSSINC MODIFY OUTPUT TABLES
/IF SUBTYPE="'Report'" PROCESS=ALL
/CUSTOM
FUNCTION="customoutputfunctions.excelexport(file='c:/temp/extest.xls',
  sheet='table#',action='CreateWorksheet')".

Warnings
Text: customoutputfunctions.excelexport(file='c:/temp/extest.xls', Command:
SPSSINC MODIFY OUTPUT
A text string is not correctly enclosed in quotation marks on the command
line.  Literals may not be continued across command lines without the use of
the continuation symbol '+'.
Text: ' ' Command: SPSSINC MODIFY OUTPUT
A text string is not correctly enclosed in quotation marks on the command
line.  Literals may not be continued across command lines without the use of
the continuation symbol '+'.
Subcommand CUSTOM: SHEET is not a valid keyword.
Execution of this command stops.

I wrote the above Modify Output syntax in my .sps file after a "means"
command.

Thanks in advance for any help you can provide...



--
Sent from: http://spssx-discussion.1045642.n5.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
Reply | Threaded
Open this post in threaded view
|

Re: Modify Output Extension - Export to multiple Excel sheets not working

Jon Peck
That FUNCTION line has an unclosed quote on it.  Make it all on one line or follow the Statistics rule for continuing a literal across lines.

On Fri, Oct 9, 2020 at 7:32 AM tbur <[hidden email]> wrote:
Hello, I searched this forum to find how to export multiple SPSS output
tables to separate sheets in Excel.  I found the Modify Output Extension
bundle & installed that, but the syntax I found on this forum is not working
for me.
I am using SPSS v24.0.0.0 and installed Python when I installed SPSS.   
Here is the syntax I used and the warning message received:

SPSSINC MODIFY OUTPUT TABLES
/IF SUBTYPE="'Report'" PROCESS=ALL
/CUSTOM
FUNCTION="customoutputfunctions.excelexport(file='c:/temp/extest.xls',
  sheet='table#',action='CreateWorksheet')".

Warnings
Text: customoutputfunctions.excelexport(file='c:/temp/extest.xls', Command:
SPSSINC MODIFY OUTPUT
A text string is not correctly enclosed in quotation marks on the command
line.  Literals may not be continued across command lines without the use of
the continuation symbol '+'.
Text: ' ' Command: SPSSINC MODIFY OUTPUT
A text string is not correctly enclosed in quotation marks on the command
line.  Literals may not be continued across command lines without the use of
the continuation symbol '+'.
Subcommand CUSTOM: SHEET is not a valid keyword.
Execution of this command stops.

I wrote the above Modify Output syntax in my .sps file after a "means"
command.

Thanks in advance for any help you can provide...



--
Sent from: http://spssx-discussion.1045642.n5.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
--
Jon K Peck
[hidden email]

===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: Modify Output Extension - Export to multiple Excel sheets not working

tbur
Thank you Jon, that fix worked to export the file, and it created a sheet in
Excel for each table I wanted...but half of the tables aren't populated in
Excel.  I ran 16 Means commands and adjusted the Modify Output syntax to
export both "Report" and "Measures of Association".  The Excel file created
a sheet for each table, but Table 14 only contains half the output that was
in the SPSS output, and after that point all the sheets are blank.
Less importantly is the sheets are all formatted differently...different
numbers of decimal places, some fonts in black some in gray...I am not as
concerned about this because I can quickly do a global format change in
Excel, but I didn't know if that could point you in the direction of the
export problem...

SPSSINC MODIFY OUTPUT TABLES
/IF SUBTYPE="'Report'" "'Measures of Association'" PROCESS=ALL
/CUSTOM
FUNCTION="customoutputfunctions.excelexport(file='c:/users/tbur/desktop/extest2.xls',sheet='table#',action='CreateWorksheet')".
(Note: in SPSS the "custom function" is all on one line.

Thanks again



--
Sent from: http://spssx-discussion.1045642.n5.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
Reply | Threaded
Open this post in threaded view
|

Re: Modify Output Extension - Export to multiple Excel sheets not working

Jon Peck
MODIFY OUTPUT uses the Statistics export capability, which is likely the problem.  In older versions of Statistics, there were some issues with the Excel Viewer export.  If you want to send me the Viewer file, I can see if it exports correctly in newer versions.  And if you haven't got the fixpack for V24, that would be a good thing to try.

On Fri, Oct 9, 2020 at 7:55 AM tbur <[hidden email]> wrote:
Thank you Jon, that fix worked to export the file, and it created a sheet in
Excel for each table I wanted...but half of the tables aren't populated in
Excel.  I ran 16 Means commands and adjusted the Modify Output syntax to
export both "Report" and "Measures of Association".  The Excel file created
a sheet for each table, but Table 14 only contains half the output that was
in the SPSS output, and after that point all the sheets are blank.
Less importantly is the sheets are all formatted differently...different
numbers of decimal places, some fonts in black some in gray...I am not as
concerned about this because I can quickly do a global format change in
Excel, but I didn't know if that could point you in the direction of the
export problem...

SPSSINC MODIFY OUTPUT TABLES
/IF SUBTYPE="'Report'" "'Measures of Association'" PROCESS=ALL
/CUSTOM
FUNCTION="customoutputfunctions.excelexport(file='c:/users/tbur/desktop/extest2.xls',sheet='table#',action='CreateWorksheet')".
(Note: in SPSS the "custom function" is all on one line.

Thanks again



--
Sent from: http://spssx-discussion.1045642.n5.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
Reply | Threaded
Open this post in threaded view
|

Re: Modify Output Extension - Export to multiple Excel sheets not working

tbur
Hi Jon,
I tried to run the fix pack and I got a message that said "Could not find
any previously installed compliant products on the machine for installing
this product."  Which is weird, since I have v24 saved on my in the default
location the installer selected.
I have (attempted to) attached the .spv file...let me know if you have
success with it in a later version.  If you do, obviously please let me know
which version you used so I can get a license for that version.
Thanks test_viewer.spv
<http://spssx-discussion.1045642.n5.nabble.com/file/t341847/test_viewer.spv>  



--
Sent from: http://spssx-discussion.1045642.n5.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