SPSS Statistics

 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

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