copying data to a spreadsheet

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

copying data to a spreadsheet

Ron0z
I’m using v22 on Windows.  After running some code that I may have written (eg. Get file, possibly followed by some compute statements, possibly match files, then a select statement, frequencies, etc) the Data Editor window will be available for me to view the data.

I can copy the data to a spreadsheet, but in doing this two problems present: 1) variable labels are not copied with the data.  This however, is a minor problem because I can then copy the variable labels from the Variable View and paste them into the spreadsheet.  This is tedious but not a big deal. 2) Copying the data can take a long time.  My process in copying the data is to select all of the columns, ctrl-C, move to my spreadsheet, ctrl-V.  With relatively few records the process is almost instantaneous, but when there upwards of 50,000 or if there are many variables the process can take several minutes.

Using save translate is very quick and is my preferred method if I’m repeating my operation regularly.  However, more often I wish to grab data and quickly transfer it to a spreadsheet, but sometimes it takes so long.  Maybe 5 to 10 minutes to copy.
Reply | Threaded
Open this post in threaded view
|

Re: copying data to a spreadsheet

Jon K Peck
File > Save As aka Save Translate does the job in a few seconds.  Why would you trouble yourself with the clipboard?  When you copy to the clipboard, the data have to be copied in at least two formats (full precision and formatted), and since the copying is done by the Data Editor, all the data have to be passed to the front end first.  With a large dataset, normally only the data necessary for display are sent to the front end.  Saving a file is done by the backend and eliminates both extra sources of overhead.  All this in addition to the processing Windows does in handling the clipboard.
 
 

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621
 
 
----- Original message -----
From: Ron0z <[hidden email]>
Sent by: "SPSSX(r) Discussion" <[hidden email]>
To: [hidden email]
Cc:
Subject: [SPSSX-L] copying data to a spreadsheet
Date: Sun, Nov 29, 2015 6:12 PM
 
I’m using v22 on Windows.  After running some code that I may have written
(eg. Get file, possibly followed by some compute statements, possibly match
files, then a select statement, frequencies, etc) the Data Editor window
will be available for me to view the data.

I can copy the data to a spreadsheet, but in doing this two problems
present: 1) variable labels are not copied with the data.  This however, is
a minor problem because I can then copy the variable labels from the
Variable View and paste them into the spreadsheet.  This is tedious but not
a big deal. 2) Copying the data can take a long time.  My process in copying
the data is to select all of the columns, ctrl-C, move to my spreadsheet,
ctrl-V.  With relatively few records the process is almost instantaneous,
but when there upwards of 50,000 or if there are many variables the process
can take several minutes.

Using save translate is very quick and is my preferred method if I’m
repeating my operation regularly.  However, more often I wish to grab data
and quickly transfer it to a spreadsheet, but sometimes it takes so long.
Maybe 5 to 10 minutes to copy.




--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/copying-data-to-a-spreadsheet-tp5731074.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
Reply | Threaded
Open this post in threaded view
|

Re: copying data to a spreadsheet

Ron0z
Thanks Jon.  That's just what I needed. I didn't know I could do that.  The way I have been doing it (using some test data about 12,000 records) took a little more than 10mins.  With 'save as' it took under a minute, and half of that time I'm sure was finding a spot to put the data and select a file format.  So, the actual transfer would have been about 30 secs, maybe less.  And the variable labels were there so that was good too.  Much obliged to you.
Reply | Threaded
Open this post in threaded view
|

Re: copying data to a spreadsheet

Ron0z
When I'm in the Data Editor, and I use "File > Save As" I'm taken to the Documents folder (this is Windows, of course).  The default is also the "SPSS Statistics (*.sav)" file type .

Is there any way I can reset the default to not take me to the Documents folder, but to another location of my choosing.  Also, can I set the default to something other than a .sav file?  

For example, each time I do this I want the dialogue to automatically go to C:\Temp with a file name of SPSS.xlsx or some other Excel file name.
Reply | Threaded
Open this post in threaded view
|

Re: copying data to a spreadsheet

Jon Peck
Go to Edit > Options > Files and set the locations you want.

On Mon, Dec 14, 2015 at 9:22 PM, Ron0z <[hidden email]> wrote:
When I'm in the Data Editor, and I use "File > Save As" I'm taken to the
Documents folder (this is Windows, of course).  The default is also the
"SPSS Statistics (*.sav)" file type .

Is there any way I can reset the default to not take me to the Documents
folder, but to another location of my choosing.  Also, can I set the default
to something other than a .sav file?

For example, each time I do this I want the dialogue to automatically go to
C:\Temp with a file name of SPSS.xlsx or some other Excel file name.



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/copying-data-to-a-spreadsheet-tp5731074p5731125.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



--
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: copying data to a spreadsheet

John F Hall
In reply to this post by Ron0z

From SPSS window(s) use:

 

Edit >> Options  >> File Locations.  You can switch from Documents to Last folder used or browse to another folder.

 

You can save your *.sav file as *.xls or *.xlsx using

 

File >> Save As >> and then scrolling down to file type required (making sure that the desired destination folder is displayed).

 

John F Hall (Mr)

[Retired academic survey researcher]

 

Email:   [hidden email] 

Website: www.surveyresearch.weebly.com

SPSS start page:  www.surveyresearch.weebly.com/1-survey-analysis-workshop

 

 

 

 

 

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ron0z
Sent: 15 December 2015 05:22
To: [hidden email]
Subject: Re: copying data to a spreadsheet

 

When I'm in the Data Editor, and I use "File > Save As" I'm taken to the Documents folder (this is Windows, of course).  The default is also the "SPSS Statistics (*.sav)" file type .

 

Is there any way I can reset the default to not take me to the Documents folder, but to another location of my choosing.  Also, can I set the default to something other than a .sav file? 

 

For example, each time I do this I want the dialogue to automatically go to C:\Temp with a file name of SPSS.xlsx or some other Excel file name.

 

 

 

--

View this message in context: http://spssx-discussion.1045642.n5.nabble.com/copying-data-to-a-spreadsheet-tp5731074p5731125.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
Reply | Threaded
Open this post in threaded view
|

Re: copying data to a spreadsheet

Ron0z
In reply to this post by Jon Peck
That's just what I needed.  Thank you.

Is there a way of changing the default file type?  The Save As dialogue default is *.sav but I'd rather it was *.xlsx (or one of the other Excel compatible file types).
Reply | Threaded
Open this post in threaded view
|

Re: copying data to a spreadsheet

Jon Peck
You can't change the default, but it would be easy to make a custom dialog box for saving that had different behavior.

On Tue, Dec 15, 2015 at 1:36 PM, Ron0z <[hidden email]> wrote:
That's just what I needed.  Thank you.

Is there a way of changing the default file type?  The Save As dialogue
default is *.sav but I'd rather it was *.xlsx (or one of the other Excel
compatible file types).



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/copying-data-to-a-spreadsheet-tp5731074p5731130.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



--
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: copying data to a spreadsheet

Ron0z
How do you make a custom dialogue, or where do I find instructions on how to make one?
Reply | Threaded
Open this post in threaded view
|

Re: copying data to a spreadsheet

Andy W
See https://andrewpwheeler.wordpress.com/2013/05/10/a-brief-intro-on-building-chart-dialogs-in-spss/ for one example walkthrough of making a custom dialog.
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: copying data to a spreadsheet

Jon Peck
In reply to this post by Ron0z
Use Utilities > Custom Dialogs.  There is lots in the help, but Andy's article would also be a good start.

On Tue, Dec 15, 2015 at 3:42 PM, Ron0z <[hidden email]> wrote:
How do you make a custom dialogue, or where do I find instructions on how to
make one?



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/copying-data-to-a-spreadsheet-tp5731074p5731132.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



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