SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
Expand all | Collapse all

How to copy & paste text between SPSS and other applications

  • 1.  How to copy & paste text between SPSS and other applications

    Posted Fri May 05, 2023 05:03 AM
    Edited by Frank Furter Fri May 05, 2023 05:04 AM

    I run SPSS (currently version 29) on a PC under Windows 10 Prof. 64-bit. For several versions of SPSS, I have noticed that it is usually not possible to copy & paste text between an SPSS syntax window and other Windows applications, e. g., Notepad or any other non-SPSS text editor - sometimes it works, but most of the time it doesn't. Moreover, when I look at the contents of the Windows clipboard (using the Windows key + V), text copied from an SPSS syntax window does not show in the clipboard history. However, copying & pasting between different windows within SPSS always works. Interestingly, I can also copy & paste text between SPSS output, data, or script windows and non-SPSS applicatiions, i.e., the issue appears to be limited to syntax windows only.

    Does the SPSS syntax window use its own clipboard? How can I copy & paste between SPSS and other applications (without opening the 'other' files in an SPSS syntax window)?



    ------------------------------
    Frank Furter
    ------------------------------



  • 2.  RE: How to copy & paste text between SPSS and other applications

    Posted Mon May 15, 2023 03:51 PM

    Hi @Frank Furter

    You have me at a loss, as I am unable to replicate the behavior you describe.  I am able to right-click and copy then right-click and paste.  I am able to CTRL+C to copy and CTRL+V to paste.  I can do this between the IBM SPSS Statistics Syntax Editor and Notepad++, Notepad, Wordpad, MS Word, etc.

    - Do these key combinations also fail for you?
    - Does the mouse combination fail?
    - Is your environment virtualized in some way rather than being a dedicated laptop/desktop installation?



    ------------------------------
    David Dwyer
    SPSS Technical Support
    IBM Software
    ------------------------------



  • 3.  RE: How to copy & paste text between SPSS and other applications

    Posted Mon May 15, 2023 04:05 PM
    I sometimes see Copy/Paste failures involving the Syntax Editor even within Statistics, but Edit > Copy and Edit > Paste seem always to work.  I have the impression that this failure is more likely if it has been a long time since I rebooted my computer, but I don't have any hard data on that.

    --





  • 4.  RE: How to copy & paste text between SPSS and other applications

    Posted Tue May 16, 2023 02:37 AM
    Edited by Frank Furter Tue May 16, 2023 12:14 PM

    David:

    As I have already written, the error does not always occur. However, when it does occur, neither Ctrl+C / Ctrl+V nor the mouse combination work. I run SPSS on two dedicated systems (desktop and notebook; no virtiualization), and the issue appears on both. This has been around for quite a while, across several versions of SPSS and across several machines that were all installed from scratch.

    When I try to copy & paste from another application (e.g., Notepad, Word, ...) to an SPSS syntax window (note that apparently only syntax windows are affected) the text that I am trying to get across is shown on the Windows clipboard (which you can see using the Windows+V combination) but it cannot be pasted into the syntax window. My conclusion is that this is a paste issue, not a copy issue.

    Interestingly, when I copy & past text from one SPSS syntax window to another and, after that, try to copy & paste from some other application to an SPSS syntax window, SPSS will still paste the text string previously copied from the syntax window even though the Windows clipboart history shows the string copied from the other application (whereas the clipboard history does not show the string copied from the SPSS syntax window).

    As Jon describes in his post above, the issue is more likely to appear when the system has been running for a 'longer' period of time. Other than Jon, I do not recall ever having had problems with pasting from one SPSS systax window to another.

    Anyway, it seems that Jon and I are not the only SPSS users with this issue - please see this thread that I found in the last IBM TechXchange Community Weekly Consolidated Digest of May 14.



    ------------------------------
    Frank Furter
    ------------------------------



  • 5.  RE: How to copy & paste text between SPSS and other applications

    Posted Wed May 17, 2023 10:59 AM

    Hi @Frank Furter 
    I have logged a defect about this behavior

    Known Issue - DT214350


    ------------------------------
    David Dwyer
    SPSS Technical Support
    IBM Software
    ------------------------------



  • 6.  RE: How to copy & paste text between SPSS and other applications

    Posted Wed May 17, 2023 12:21 PM

    Hi @Frank Furter ,

    I took a quick look at the code and I think I see the problem. At some time in the past someone put in code to try and preserve the proper decimal symbol (comma versus period) when copying data from the data editor and the decimal symbol of the SPSS Locale does not equal the decimal symbol of the system locale. In those cases only, an additional clipboard format is added to the system clipboard, and code in the Syntax Editor prefers this format when found.

    I have filed a defect on this issue, but in the meantime, the following steps should enable you to work around the issue.

    - When you experience this problem, try copying some dummy text to the clipboard from the Syntax Editor window. That should have the effect of clearing any previous clipboard formats put up there by the Data Editor. Then you should be able to go to an external application, copy some string data, and paste it into the Syntax window.

    HTH,



    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 7.  RE: How to copy & paste text between SPSS and other applications

    Posted Tue May 23, 2023 01:49 AM
    Edited by Frank Furter Tue May 23, 2023 01:50 AM

    @ Curtis Browning:
    Thank you for jumping in. When SPSS is in a state where copying & pasting from another application does not work, the issue is not resolved by copying some 'dummy' text from a syntax editor window. The 'dummy' text also does not show on the Windows clipboard and cannot be pasted into applications outside SPSS. I've also noticed that in this state, you cannot copy & paste from another application to one of SPSS' open or save file dialogs (e.g., a path copied from a file manager to save typing).



    ------------------------------
    Frank Furter
    ------------------------------



  • 8.  RE: How to copy & paste text between SPSS and other applications

    Posted Tue May 23, 2023 12:47 PM

    Hi @Frank Furter,

    Hmm... that is indeed strange. I am not able to reproduce the effect you are describing, although I can reproduce what I saw from the code. Looking closely at the code it still isn't clear to me how you could get into a state that you cannot get out of. It would be very helpful if you can describe the steps to reproduce this problem.

    Thanks,
    Curtis



    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 9.  RE: How to copy & paste text between SPSS and other applications

    Posted Thu May 25, 2023 09:35 AM

    Hi @Curtis Browning,

    in your post above, you have recommended that 

    > When you experience this problem, try copying some dummy text to the clipboard from the Syntax Editor window.

    As already mentioned, this does not resolve the issue. However, when I copy some dummy text from a Data Editor window, this restores the SPSS clipboard to the 'normal', expected stated where I can copy & paste between a Syntax window and other applications outside SPSS.

    HTH finding resolution!



    ------------------------------
    Frank Furter
    ------------------------------



  • 10.  RE: How to copy & paste text between SPSS and other applications

    Posted Thu May 25, 2023 05:00 PM

    Thank you @Frank Furter , that is helpful information and I have added it to the defect report about this.

    Best,



    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 11.  RE: How to copy & paste text between SPSS and other applications

    Posted Thu January 23, 2025 12:01 PM

    Hello all,

    Getting a complete fix on this would be FANTASTIC.

    I was part of that previous post provided by Frank Furter and I am still having this issue, and I'm now on v29.0.2 (installed locally on Windows 11). However, the frequency is now basically every time I use SPSS, and it can happen immediately. Also, it used to be the case that as a workaround, I could copy something from Data Editor into the syntax window, which would then allow me to copy from outside SPSS and paste into a syntax window. This workaround now doesn't work (at least sometimes it doesn't work) whereas before it would always work.



    ------------------------------
    Chris Keran
    ------------------------------



  • 12.  RE: How to copy & paste text between SPSS and other applications

    Posted Thu January 23, 2025 02:32 PM

    Hi @Chris Keran,

    It's been awhile since we looked at this and I certainly hope it is fixed in version 30. Since I don't have your original posting in this thread, can you humor me please and describe the steps needed to reproduce the problem on Windows 11 using 29.0.2? I want to make sure this has been fixed.

    FWIW, when this first came up, I personally looked through the code and found a special internal clipboard that was setup to try and ensure that the locale used to format numbers on the clipboard was correct. Turns out that code caused problems such as the one described above, and we had it removed. Now the clipboard handling is much more straight-forward, so if on the outside chance we are able to reproduce what you are seeing with the newest version, it should be fairly easy to address. At this point however, the numeric formatting for clipboard numbers appears to be working correctly, and the mysterious internal clipboard has been removed.



    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 13.  RE: How to copy & paste text between SPSS and other applications

    Posted Fri January 24, 2025 01:05 AM

    Hi @Curtis Browning,

    just scroll up a bit, the steps are all in this thread ;) Trouble is that the issue is not readily reproducible; I've still not found out what exactly triggers the issue. The most important component appears to be time: after you have worked in SPSS for 'some time', the issue occurs.



    ------------------------------
    Frank Furter
    ------------------------------



  • 14.  RE: How to copy & paste text between SPSS and other applications

    Posted Sat February 01, 2025 02:05 PM
      |   view attached

    I agree with Frank Furter that I haven't systematically been able to reproduce the problem, however, the amount of time it took for this issue to occur for me has been shrinking, and occurs almost immediately when first launching SPSS (before it may have been hours). FYI, my trusted advisor Jon Peck at one point believed it had to do with a double clipboard (see attached screenshot), however, according to Curtis Brown, perhaps that has been ruled out?

    FYI, Sometimes the resolution is to copy something out of the Data window into the syntax window, and that often seems to clear the issue, but only for a short period of time.



    ------------------------------
    Chris Keran
    ------------------------------



  • 15.  RE: How to copy & paste text between SPSS and other applications

    Posted Mon February 03, 2025 03:51 AM

    Hi @Curtis Browning,

    regarding this issue, I was in intense contact with SPSS support for three months last year! I even provided a video demonstrating the problem. 
    The problem is not reliably reproducible. Sometimes it happens, sometimes it doesn't. Copying text via Copy & Paste with CTRL+C and CTRL+V between two syntax windows or between syntax and Notepad eventually ALWAYS leads to this issue for me and my colleagues.
    The support person said twice they were able to reproduce (a developer and himself) the issue and that it has been acknowledged and will be fixed in one of the next versions (30+).



    ------------------------------
    Frederic Dahl
    ------------------------------



  • 16.  RE: How to copy & paste text between SPSS and other applications

    Posted Mon February 03, 2025 08:52 AM

    Hi @Frederic Dahl and @Chris Keran,

    Which version of Statistics are you seeing this problem with? As noted earlier we removed the secondary data clipboard in version 30, so I am quite interested to see if you are still experiencing this issue using the latest version.

    Thanks,



    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 17.  RE: How to copy & paste text between SPSS and other applications

    Posted Mon February 03, 2025 09:41 AM

    Hi @Curtis Browning,

    Thank you for your reply. I am on v29.0.2. I usually don't upgrade to the new version until at least 6 months go by (no longer need to be on the bleeding edge), but if @Frederic Dahl or @Frank Furter find switching to v30 resolves it, I will too. How new is v30?

    Thanks



    ------------------------------
    Chris Keran
    ------------------------------



  • 18.  RE: How to copy & paste text between SPSS and other applications

    Posted Fri February 07, 2025 02:36 AM

    Hi @Curtis Browning,

    I'm still using version 29.0.2.

    I didn't update to 30 because - if I remember correctly - it introduced a serious problem related to UTF8-encoded Syntax files.

    Best regards,

    Frederic



    ------------------------------
    Frederic Dahl
    ------------------------------



  • 19.  RE: How to copy & paste text between SPSS and other applications

    Posted Mon February 10, 2025 03:47 PM

    Hi @Frederic Dahl, I am not aware of any UTF-8 problems with syntax files in version 30. If you have any other information to share about that, it will be most appreciated.

    Thanks,



    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 20.  RE: How to copy & paste text between SPSS and other applications

    Posted Mon February 10, 2025 04:26 PM

    Regarding V30, it is true that the initial V30 release had a serious problem with character encoding, but the V30 release was fixed and reposted within a few days, so there should be no problem with it now.



    ------------------------------
    Jon Peck
    Data Scientist
    JKP Associates
    Santa Fe
    ------------------------------



  • 21.  RE: How to copy & paste text between SPSS and other applications

    Posted Mon February 10, 2025 04:27 PM

    Hi @Frederic Dahl, I now believe you are referring to a problem with the v30 media that was fixed and refreshed within a couple of days of the v30 release. Syntax documents should be fine now in the v30 media.

    Best,



    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 22.  RE: How to copy & paste text between SPSS and other applications

    Posted Tue February 04, 2025 02:02 PM

    Hi Curtis,

    I installed the V 30 a few months ago, and I can tell you that this problem continues. The problem happens after some time as has been mentioned. Yesterday, I was attempting to 'insert' many text files from a survey of n=2000+ and because the mode of data collection was with a paper booklet, I had hundred of lines that was created in multiple Excel sheets (using CONCAT function). The code was simple, but the texts were long and some of them in Spanish:

    IF survey_ID=1234 and Person_ID=9876 OpenResponse1="El servicio era muy malo y la niña tuvo una reacción inesperada".

    IF survey_ID=4321 and Person_ID=6789 OpenResponse1="I had a great experience with the service manager".

    There was a point Ctr+C - Ctr+V stopped working from Excel to SPSS. However, within the SPSS environment these key strokes would work. And, I would realize that it stopped working because the SPSS will paste only the Ctr+C values/texts that have been the last action within SPSS. 

    This behavior, I believe, is triggered when Ctr+C - Ctr+V are alternating (within the SPSS only -e.g. multiple syntaxfiles-, and Excel to SPSS). 

    The way around this:

    -save all, and restart the SPSS: Always works, but I never do when I am in the mist of programming time.

    -Use the drop down menu (no keyboard): only in some circumstances (which is hard to describe here) works. 

    -First, use the drop-down menu (NO keyboards) to copy and paste a new "space" in a syntax file, then the Ctr+C + Ctr+V from Excel to SPSS will work until you alternate, to the copy and paste within the SPSS. In older versions (V24-25?) a Ctr+C - Ctr+V of 'nothing' in SPSS used to the trick. Yet, this one stopped working in V29 for me.

    I have focused on what happened yesterday, with Excel-SPSS only, but this behavior happens with Word, NoteTab, NotePad, etc. 

    I hope this helps to replicate the issue on your end.

    KP



    ------------------------------
    Ki Park
    ------------------------------



  • 23.  RE: How to copy & paste text between SPSS and other applications

    Posted Wed February 05, 2025 09:59 AM

    Hi @Ki Park,

    Thanks for this information. This is the first I've heard of this problem in version 30. I have filed a defect with the steps you have provided and we will have our QA try to reproduce it.

    Best regards,



    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 24.  RE: How to copy & paste text between SPSS and other applications

    Posted Thu February 06, 2025 02:20 AM

    Hi all, 

    We - a team of about five intensive SPSS users - have been using SPSS V27 since 2021 and have been confronted with this copy and paste problem ever since. I can confirm Ki Park's description and also the solutions mentioned.

    I would like to see a fixpack that changes this behavior. This is really quite annoying.

    Best regards,

    Alexander



    ------------------------------
    Alexander Mentrup
    (r)evolution GmbH
    Bonn
    ------------------------------



  • 25.  RE: How to copy & paste text between SPSS and other applications

    Posted Fri February 07, 2025 02:09 PM

    Hi Curtis,

    I thought that I would share a particular 'misbehavior' with the copy and paste.

    This is between syntax file and a Google document I experienced yesterday. And, it is related to the  use of drop-down menu that I mentioned in the previous post.

    Again, I have been working in a SPSS dataset and working with a syntax file for a while. I wrote a small code that I wanted to save it into our Google doc as potential 'solution' for similar issues in the data cleaning/management (this is the Google drive where we archive some solutions that we can use in other projects). So, I was trying to use Ctr+C from SPSS, and Ctr+V into Google doc. The Ctr+C part will not work in the syntax file regardless of the size of the code that I wanted to copy. This is the scenario where the drop-down menu (from the SPSS menu bar or right-click mouse) and choosing "copy" will allow to go to Google doc and use the Ctr+V (no need to use drop-down here). This behavior is pretty consistent and it happens in other programs such as the one I mentioned in the previous post.

    I hope that this helps to recreate the issues on your team.

    Thanks again for looking at this issue.

    Ki



    ------------------------------
    Ki Park
    ------------------------------



  • 26.  RE: How to copy & paste text between SPSS and other applications

    Posted Mon February 10, 2025 03:44 PM

    Hi @Ki Park, thank you for this information. We are still having difficulty reproducing this in version 30, but I have added your description above to the defect report and we will continue to try and reproduce it.

    Can you confirm please whether you are using the Windows or the MacOS version of Statistics please?

    Thank you,



    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 27.  RE: How to copy & paste text between SPSS and other applications

    Posted Mon February 10, 2025 04:01 PM

    Hi Curtis, 

    Just wanted to add to others scenarios. I often cut and paste from MS File Explorer (copying the file path or the file name) into SPSS and that is when this issue comes up primarily for me (also occurs between Word/Excel or it seems any other program too). I'm obviously using Windows (v11 but happened with v10 as well).

    This happens pretty systematically for me (and my team) soon after using SPSS, perhaps say within 5 minutes, so I'd be glad to jump on a Zoom call or something and share my screen so that you or the Tech Team can witness this behavior.

    Chris



    ------------------------------
    Chris Keran
    ------------------------------



  • 28.  RE: How to copy & paste text between SPSS and other applications

    Posted Mon February 10, 2025 04:18 PM

    Thank you Chris, I have added this information to the defect and have asked that an engineer reach out to you if they still cannot reproduce.

     

    Best,

     

    ---------------------------------------

    Curtis Browning

    IBM SPSS Statistics Architect

    brownicu@us.ibm.com

    ---------------------------------------

     

     






  • 29.  RE: How to copy & paste text between SPSS and other applications

    Posted Tue February 11, 2025 08:20 AM

    Sounds good, thank you, Curtis.



    ------------------------------
    Chris Keran
    ------------------------------



  • 30.  RE: How to copy & paste text between SPSS and other applications

    Posted Fri March 28, 2025 04:12 PM

    Hi Curtis,

    Yes, this clipboard issue is still present in SPSS 30. I see in a different thread that, about a month ago, you asked for someone to zoom so your team could see the issue in action. Do you still need that?

    If so, I will happily email you when it happens to volunteer... though I won't want to hold my work up indefinitely. Wanna try?

    It's worth my time to help in any way to get this resolved.

    Best, Carolyn

    From you in other thread:
    "Unfortunately I am unable to respond to private messages sent via the Statistics Community. Can you email me directly please at brownicu@us.ibm.com and we can setup a Zoom or Teams call with our QA in Kochi, India? That seems the best way to proceed. I will be there as well."



    ------------------------------
    Carolyn Stapleton
    ------------------------------



  • 31.  RE: How to copy & paste text between SPSS and other applications

    Posted Fri March 28, 2025 04:37 PM
    This problem seems very elusive, but I'll repeat what seems to work for me.

    After doing ctrl-c on a selection, use Windows+v to see what is actually on the keyboard.  That will show whether it is a copy or paste issue,

    If the selection didn't copy,  use Edit > Copy rather than ctrl-C.  That seems always to work for me.


    --





  • 32.  RE: How to copy & paste text between SPSS and other applications

    Posted Mon March 31, 2025 09:29 AM
    Edited by Curtis Browning Mon March 31, 2025 09:30 AM

    Hi @Carolyn Stapleton, thanks for your kind offer to help. We were not able to reach the other user, so a Zoom call with you would be very helpful. Please send me a message at brownicu@us.ibm.com and we will make arrangements to work with you on this issue.

    Best regards,

    Curtis



    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 33.  RE: How to copy & paste text between SPSS and other applications

    Posted Tue April 15, 2025 03:35 PM

    I'm very interested in the outcome of this, and also willing to jump on a call if that would be helpful.



    ------------------------------
    Chris Keran
    ------------------------------



  • 34.  RE: How to copy & paste text between SPSS and other applications

    Posted Thu April 17, 2025 08:58 AM
    Edited by Curtis Browning Thu April 17, 2025 12:42 PM

    To our loyal IBM SPSS Statistics customers: We are still working on this issue, and there is both good and bad news to report about it:

    We have under limited conditions conditions been able to reproduce the problem on Windows. We are still working on discovering the triggers and developing solutions, but please also see below.

    The bad news is that this appears to be a long-standing Windows clipboard issue that affects other products and customers as well. Apparently it has been around for awhile and various solutions have been proposed by third parties. Thus far we have not been able to develop a viable work-around other than simply restarting the program, but we haven't given up and are still working on a C++ solution that circumvents the Java clipboard.

    Some links for reference:

    I wanted to share the above information with all users who have been affected by this problem. We are now writing a native C++ DLL (for Windows only) to circumvent Java, and also adding retry logic to the copy and paste functionality in an effort to work around this Windows issue. That change will be in the upcoming version 31 release at the end of June of this year. However it appears that this is a general Windows issue that will require fixes from Microsoft. 

    Thanks to everyone for their patience and help in tracking down this issue.



    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 35.  RE: How to copy & paste text between SPSS and other applications

    Posted Fri April 18, 2025 12:31 PM

    FYI, one of my colleagues who uses SPSS for the Mac also experiences this copy-paste problem.  Are you saying you have not been able to reproduce it using the Mac version? 



    ------------------------------
    Bruce Weaver
    ------------------------------



  • 36.  RE: How to copy & paste text between SPSS and other applications

    Posted Fri April 18, 2025 01:34 PM

    Hi @Bruce Weaver. What version of Statistics for MacOS does your colleague have? We made changes between versions 29 and 30. Thus far no one on our team has seen the issue on MacOS with the most recent code, and the kinds of general OS issues described on Windows above have not been found on MacOS. 

    If OTOH, your colleague is able to reproduce the problem using version 30 on MacOS, we would much appreciate any replication steps that you can provide.

    Regards,

    Curtis



    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 37.  RE: How to copy & paste text between SPSS and other applications

    Posted Fri April 18, 2025 02:13 PM

    Hello @Curtis Browning.  My colleague has version 29.0.2.0 for the Mac.  Our university is due to get v30 later this year. 



    ------------------------------
    Bruce Weaver
    ------------------------------



  • 38.  RE: How to copy & paste text between SPSS and other applications

    Posted Tue April 22, 2025 03:58 PM

    Hi @Curtis Browning,

    Thank you for the update, even though it isn't the best of news. Appreciate it.



    ------------------------------
    Chris Keran
    ------------------------------



  • 39.  RE: How to copy & paste text between SPSS and other applications

    Posted 20 hours ago

    Hi @Curtis Browning,

    I see v31 is now released. Has anyone tried to see if the copy/paste misbehavior has been resolved?

    Thanks,

    Chris



    ------------------------------
    Chris Keran
    ------------------------------



  • 40.  RE: How to copy & paste text between SPSS and other applications

    Posted 17 hours ago

    Hi @Chris Keran,

    We have added some retry logic in an attempt to address the Windows clipboard problems I mentioned on April 17th above. As noted there, this is an external Windows problem over which Statistics has no control. Since our engineers added the retry logic, our QA has been unable to reproduce the problem in version 31, but since the problem is an external Windows one we cannot guarantee that the problem is completely resolved. A fix from Microsoft is needed to completely address the issue. Will be interested to hear how users such as yourself see whether our retry work-around also resolves the issue for you.

    Best regards,



    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------