exceloptions in save translate

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

exceloptions in save translate

Mark Gunty
I would like to use save translate repeatedly to add worksheets to a specified Excel file. Using SPSS 26.

I tried:
save translate outfile=filename/type=xls/version=12
  /keep var1 var2 var3 /fieldnames /append /exceloptions sheet='try2'.

and 
save translate outfile=filename/type=xls/version=12  /exceloptions sheet='try2'
  /keep var1 var2 var3 /fieldnames /append .  

Neither work as intended.

Suggestions welcome.

Gratefully,
M Gunty
University of Notre Dame
===================== 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: exceloptions in save translate

Jon Peck
What did you intend that didn't happen?

On Tue, Apr 21, 2020 at 3:51 PM Mark Gunty <[hidden email]> wrote:
I would like to use save translate repeatedly to add worksheets to a specified Excel file. Using SPSS 26.

I tried:
save translate outfile=filename/type=xls/version=12
  /keep var1 var2 var3 /fieldnames /append /exceloptions sheet='try2'.

and 
save translate outfile=filename/type=xls/version=12  /exceloptions sheet='try2'
  /keep var1 var2 var3 /fieldnames /append .  

Neither work as intended.

Suggestions welcome.

Gratefully,
M Gunty
University of Notre Dame
===================== 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: exceloptions in save translate

Mark Gunty
It is not adding a sheet to the Excel workbook named in 'filename'. After running the syntax, the workbook is the same as it was before running the syntax.

On Tue, Apr 21, 2020 at 7:25 PM Jon Peck <[hidden email]> wrote:
What did you intend that didn't happen?

On Tue, Apr 21, 2020 at 3:51 PM Mark Gunty <[hidden email]> wrote:
I would like to use save translate repeatedly to add worksheets to a specified Excel file. Using SPSS 26.

I tried:
save translate outfile=filename/type=xls/version=12
  /keep var1 var2 var3 /fieldnames /append /exceloptions sheet='try2'.

and 
save translate outfile=filename/type=xls/version=12  /exceloptions sheet='try2'
  /keep var1 var2 var3 /fieldnames /append .  

Neither work as intended.

Suggestions welcome.

Gratefully,
M Gunty
University of Notre Dame
===================== 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: exceloptions in save translate

Mark Gunty
In reply to this post by Mark Gunty
FYI, I was able to solve this problem. No need for additional comments. Thank you.

On Tue, Apr 21, 2020 at 5:50 PM Mark Gunty <[hidden email]> wrote:
I would like to use save translate repeatedly to add worksheets to a specified Excel file. Using SPSS 26.

I tried:
save translate outfile=filename/type=xls/version=12
  /keep var1 var2 var3 /fieldnames /append /exceloptions sheet='try2'.

and 
save translate outfile=filename/type=xls/version=12  /exceloptions sheet='try2'
  /keep var1 var2 var3 /fieldnames /append .  

Neither work as intended.

Suggestions welcome.

Gratefully,
M Gunty
University of Notre Dame
===================== 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: exceloptions in save translate

Bruce Weaver
Administrator
For the benefit of anyone who finds this thread in the future while
experiencing the same issue, how did you solve the problem?  


Mark Gunty wrote
> FYI, I was able to solve this problem. No need for additional comments.
> Thank you.
>
> On Tue, Apr 21, 2020 at 5:50 PM Mark Gunty &lt;

> mgunty@

> &gt; wrote:
>
>> I would like to use save translate repeatedly to add worksheets to a
>> specified Excel file. Using SPSS 26.
>>
>> I tried:
>> save translate outfile=filename/type=xls/version=12
>>   /keep var1 var2 var3 /fieldnames /append /exceloptions sheet='try2'.
>>
>> and
>> save translate outfile=filename/type=xls/version=12  /exceloptions
>> sheet='try2'
>>   /keep var1 var2 var3 /fieldnames /append .
>>
>> Neither work as intended.
>>
>> Suggestions welcome.
>>
>> Gratefully,
>> M Gunty
>> University of Notre Dame
>>
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (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





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
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
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
Reply | Threaded
Open this post in threaded view
|

Re: exceloptions in save translate

Mark Gunty
The day after my original attempt, I started by completely cleaning out the directory where I was writing files to. Having restarted SPSS, I started from scratch with my syntax (there was a bit of code before getting to the SAVE TRANSLATE section). I ran SAVE TRNASLATE with the EXCELOPTIONS subcommand for one set of output. I then ran it with the same destination workbook filename, but with a new set of output. Lo and behold, the Excel workbook had two sheets, corresponding to the two outputs. After that, I could keep adding sheets as needed and create new workbooks as needed.

In short, it may have been nothing more than starting fresh. I know this is attributing too much human-ness to SPSS, but sometimes I think it gets "tired" in the afternoon.

As an added bonus, I did find out in the process that SAVE TRANSLATE is sensitive to non-standard characters. Because I was outputting text from a survey, someone must have done something when entering their comment. It corrupted the target workbook to the point where I couldn't even open it. I did find the offending text by using Notepad++ and cleaned it up. Then SAVE TRANSLATE worked for that output.

Mark Gunty

On Thu, Apr 23, 2020 at 8:54 AM Bruce Weaver <[hidden email]> wrote:
For the benefit of anyone who finds this thread in the future while
experiencing the same issue, how did you solve the problem? 


Mark Gunty wrote
> FYI, I was able to solve this problem. No need for additional comments.
> Thank you.
>
> On Tue, Apr 21, 2020 at 5:50 PM Mark Gunty &lt;

> mgunty@

> &gt; wrote:
>
>> I would like to use save translate repeatedly to add worksheets to a
>> specified Excel file. Using SPSS 26.
>>
>> I tried:
>> save translate outfile=filename/type=xls/version=12
>>   /keep var1 var2 var3 /fieldnames /append /exceloptions sheet='try2'.
>>
>> and
>> save translate outfile=filename/type=xls/version=12  /exceloptions
>> sheet='try2'
>>   /keep var1 var2 var3 /fieldnames /append .
>>
>> Neither work as intended.
>>
>> Suggestions welcome.
>>
>> Gratefully,
>> M Gunty
>> University of Notre Dame
>>
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (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





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
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: exceloptions in save translate

Bruce Weaver
Administrator
Thanks for closing the loop.  


Mark Gunty wrote

> The day after my original attempt, I started by completely cleaning out
> the
> directory where I was writing files to. Having restarted SPSS, I started
> from scratch with my syntax (there was a bit of code before getting to the
> SAVE TRANSLATE section). I ran SAVE TRNASLATE with the EXCELOPTIONS
> subcommand for one set of output. I then ran it with the same destination
> workbook filename, but with a new set of output. Lo and behold, the Excel
> workbook had two sheets, corresponding to the two outputs. After that, I
> could keep adding sheets as needed and create new workbooks as needed.
>
> In short, it may have been nothing more than starting fresh. I know this
> is
> attributing too much human-ness to SPSS, but sometimes I think it gets
> "tired" in the afternoon.
>
> As an added bonus, I did find out in the process that SAVE TRANSLATE is
> sensitive to non-standard characters. Because I was outputting text from a
> survey, someone must have done something when entering their comment. It
> corrupted the target workbook to the point where I couldn't even open it.
> I
> did find the offending text by using Notepad++ and cleaned it up. Then
> SAVE
> TRANSLATE worked for that output.
>
> Mark Gunty





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
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
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.