SPSS Statistics

 View Only
Expand all | Collapse all

Cannot copy/paste from another program into syntax editor

  • 1.  Cannot copy/paste from another program into syntax editor

    Posted Tue December 07, 2021 10:03 PM

    I noticed a long discussion of this topic several years ago, but did not see any solution. I use SPSS v. 27 with Windows 10 Pro 64-bit. After some time working on the SPSS syntax editor, I can no longer copy text from another program, such as Word or Excel, into my syntax file. This is a serious annoyance; I work with survey data and like to define variable labels by copying the actual question from the questionnaire into the VARIABLE LABELS command. Previous discussions suggested emptying the Windows copy/paste buffer; pasting the text first to another program, such as Notepad; and copying something within the syntax file, but none of these fix the problem for me. So far, the only sure-fire solution is to close down SPSS entirely, then restart it. But in the middle of a complex analysis, this is a serious pain and a substantial waste of time. Can someone at IBM please provide a solution to this annoying problem?






    #SPSSStatistics
    #Support
    #SupportMigration


  • 2.  RE: Cannot copy/paste from another program into syntax editor

    Posted Wed December 08, 2021 04:08 AM

    I have not had that problem, although I have the same configuration, but there are a few things to try that might help.

    • When you want to paste, use Windows+v. That will show you the items on the clipboard, and you can select what you want to paste.
    • Instead of restarting Statistics, open a new syntax window and try to paste there
    • Try using Edit > Paste rather than ctrl+v or Windows+v






    #SPSSStatistics
    #Support
    #SupportMigration


  • 3.  RE: Cannot copy/paste from another program into syntax editor

    Posted Wed December 08, 2021 07:18 PM

    Dear Jon:

    Thanks very much for these suggestions. When the copy/paste fails, I have tried using the Edit / Paste menu instead of Cntl-V, but without success. Next time the problem occurs after a couple of hours of syntax editing, I will try Windows-V instead of Cntl-V and I will try a new syntax window.






    #SPSSStatistics
    #Support
    #SupportMigration


  • 4.  RE: Cannot copy/paste from another program into syntax editor

    Posted Wed December 08, 2021 08:06 PM

    At least, using Windows-V will prove decisively whether the problem is on the copy side or the paste side. I like to use it often, because it lets me have a stack of items on the clipboard that I can choose to paste from.






    #SPSSStatistics
    #Support
    #SupportMigration


  • 5.  RE: Cannot copy/paste from another program into syntax editor

    Posted Sat January 08, 2022 10:13 PM

    Inability to copy/paste into SPSS syntax file.






    #SPSSStatistics
    #Support
    #SupportMigration


  • 6.  RE: Cannot copy/paste from another program into syntax editor

    Posted Sat January 08, 2022 10:17 PM

    Dear Jon:

    Nope, none of your suggestions work. I am usually trying to copy from Word 2016 to an SPSS syntax file, but without success. Can you think of anything else to do? This is very annoying when trying to annotate a syntax file or do other things, such as copy questionnaire responses into a VALUE LABELS command. Sometimes I am working on very complicated analyses with several open syntax files, databases, and output files. In order restore copy/paste, I have to close everything down and start over. Not great behavior from a $3,000 program, eh?






    #SPSSStatistics
    #Support
    #SupportMigration


  • 7.  RE: Cannot copy/paste from another program into syntax editor

    Posted Thu May 11, 2023 09:31 AM

    I have been having the same copy/paste issue described since at least back to v27 (I'm on v29 now), and the frequency seems to be increasing. The one additional context I would add is that after I copy something from OUTSIDE a syntax window (ctrl-c), when I paste into a syntax window (ctrl-v), it will often paste the last thing I had copied from WITHIN a syntax window. The only consistent solution I've found is to close and then restart SPSS. As described, this is a HUGE time waste.



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



  • 8.  RE: Cannot copy/paste from another program into syntax editor

    Posted Mon August 14, 2023 02:35 PM

    Not sure if you've resolved this issue. I've been having the same issue and I was just randomly trying different things. If this happens again, try copying something from the Output window, and then copy what you actually want to copy from the external app and then paste into the syntax window. This worked for me just now.



    ------------------------------
    Eva Ho Lam Yiu
    ------------------------------



  • 9.  RE: Cannot copy/paste from another program into syntax editor

    IBM Champion
    Posted Mon August 14, 2023 02:46 PM
    An earlier post discussed the cause of this problem, but I want to reiterate that if you use Edit > Copy instead of ctrl-C, the clipboard seems to work better.

    --





  • 10.  RE: Cannot copy/paste from another program into syntax editor

    Posted Mon August 28, 2023 07:05 AM

    This ugly workaround worked for me.

    I had Python code in Notebooks. Cut'n paste did not work, not with Ctrl-C / Ctrl-V nor with the menu-driven approach. Copied to MS Word to no avail. Then saved as txt-file and imported the txt-file as a dataset with one variable in SPSS. Then copied the lines of code from the Dataset to the Syntax page. The copy worked, minor editing remains.



    ------------------------------
    Jos Blykers
    ------------------------------



  • 11.  RE: Cannot copy/paste from another program into syntax editor

    Posted Mon October 16, 2023 01:27 PM

    I have also been encountering this problem for years, but have similarly noticed it becoming much more frequently a problem more recently. I have tried, Edit > Paste, Windows + V etc. etc. and nothing actually seems to solve the problem consistently. As I assume it is not something that is going to be fixed anytime soon I guess we just have to put up with it? As was said, not great for such expensive software.

    The only workaround I have is to load the syntax files up in Notepad and edit there, only bringing them back into SPSS to run them. Very annoying and very inefficient, but a damn sight quicker than waiting for SPSS to actually do anything about it.



    ------------------------------
    Joe Twyman
    ------------------------------



  • 12.  RE: Cannot copy/paste from another program into syntax editor

    IBM Champion
    Posted Mon October 16, 2023 03:57 PM
    Edit > Copy or Paste usually works for me, but it is certainly annoying.  My understanding is that it is due to Statistics having a double clipboard in order to handle decimal points correctly when the SPSS locale setting is different from the OS decimal.  Fixing that apparently is complicated, but I don't know the details.--





  • 13.  RE: Cannot copy/paste from another program into syntax editor

    Posted Mon November 27, 2023 08:48 AM

    Great it works for me !



    ------------------------------
    Claudio Merro
    ------------------------------



  • 14.  RE: Cannot copy/paste from another program into syntax editor

    Posted 11 hours ago

    That's brilliant!
    That solved my "How do I avoid retyping a LOT of lines of syntax?" problem.

    Urban Landreman
    Hennepin County Public Health



    ------------------------------
    Urban Landreman
    ------------------------------



  • 15.  RE: Cannot copy/paste from another program into syntax editor

    Posted 2 hours ago

    Hi Urban,

    I agree, that is a brilliant work around, however, for me, there is a more efficient workaround. I used to have to reboot SPSS until someone on this forum mentioned copying something out of the data file (I just copy one cell), paste that into the syntax window, recopy what I wanted to originally paste (say from Word, Excel, Explorer, etc.) and then I'm able to paste that into the syntax window. This works EVERY TIME for me.

    Looking forward to when the real fix happens!

    Chris



    ------------------------------
    Chris Keran
    American Academy of Neurology
    ------------------------------



  • 16.  RE: Cannot copy/paste from another program into syntax editor

    Posted Sat January 08, 2022 10:32 PM

    Sorry, I don't know the root cause, but I have intermittent clipboard problems between programs other than SPSS, so I don't know whether these are OS problems or something specific within SPSS. However, one other workaround would be to save the file you want to copy to disk as an sps file and then open it in Statistics. Have you also tried closing the target file/window and reopening it before the paste?

    I would also suggest reporting this via Help > Report an issue.






    #SPSSStatistics
    #Support
    #SupportMigration


  • 17.  RE: Cannot copy/paste from another program into syntax editor

    Posted Tue October 17, 2023 01:56 AM
    Edited by Frank Furter Tue October 17, 2023 01:56 AM

    I've had the same problem for several versions of SPSS (I'm currently on 29). You can of course close and re-open SPSS, which restores the clipboard to 'normal' operation, but this is pretty annoying. A more 'elegant' workaround is to copy any text from an open SPSS data editor window. After that, copying & pasting between SPSS and other applications works again, at least for some time (please see the discussion here). Admittedly, this is a workaround but not a solution ...



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



  • 18.  RE: Cannot copy/paste from another program into syntax editor

    Posted Thu November 09, 2023 12:23 PM

    Me too! This is such a pain. IBM SPSS: Please please fix this ASAP!!!

    I've noticed that the suggested "fixes" work intermittently as well. I have not found one (other than closing the program) to work reliably. And I'm not so sure about that either... I can remember rebooting my laptop at times to "reset" the clipboard.

    What's killing me about this today? New laptop. Latest version of SPSS. And STILL this bug shows up, and the syntax window may only have been open for 5-15 minutes. I agree with all the other posters that this is very annoying and doesn't help me work efficiently.

    I see that I opened a case with IBM SPSS on May 17, 2023 about this issue. So, still no fix. Come on you guys!



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



  • 19.  RE: Cannot copy/paste from another program into syntax editor

    Posted Fri November 10, 2023 05:38 AM
    Edited by Patrick Henry-Lucet Fri November 10, 2023 05:39 AM

    Hello there.

    "I've noticed that the suggested "fixes" work intermittently as well."

    One that works for me : copy anything from the data window (even blank cell), paste it in syntax, save, and voilà.

    But I'd like an official fix too.



    ------------------------------
    Patrick Henry-Lucet
    ------------------------------



  • 20.  RE: Cannot copy/paste from another program into syntax editor

    Posted 20 days ago

    This worked for me! Thanks.



    ------------------------------
    Matt Evans
    ------------------------------



  • 21.  RE: Cannot copy/paste from another program into syntax editor

    Posted Mon December 18, 2023 10:08 AM

    This problem has been around for years. Sometimes it comes, sometimes it goes. Sometimes using "edit" works, sometimes it doesn't. It's a real shame to have a problem like this with such expensive software!!!



    ------------------------------
    Alexandre Pollien
    ------------------------------



  • 22.  RE: Cannot copy/paste from another program into syntax editor

    Posted Fri January 05, 2024 01:36 PM

    I landed on this page while trying to figure out my own issue.  It seems ridiculous to me that this was known for years and not fixed.  I can't write syntax if I'm thinking about how to copy/paste instead of the code.  FIX THIS.



    ------------------------------
    Michael Hannon
    ------------------------------



  • 23.  RE: Cannot copy/paste from another program into syntax editor

    Posted Fri January 05, 2024 01:40 PM
    Edited by David Dwyer Fri January 05, 2024 01:41 PM

    Hi @Michael Hannon

    This problem was logged with IBM SPSS Statistics Development and is discussed in Known Issue DT214350. It has now been addressed in IBM SPSS Statistics 29.0.2.0.  Please update to version 29.0.2.0.



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



  • 24.  RE: Cannot copy/paste from another program into syntax editor

    Posted Thu January 25, 2024 06:49 AM

    @David Dwyer

    In my installation, the issue still persists despite updating to version 29.0.2.0. OS: MS Windows 10 Pro 64-bit 22H2. 



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



  • 25.  RE: Cannot copy/paste from another program into syntax editor

    Posted Thu January 25, 2024 08:34 AM

    @Frank Furter

    Well, that's a shame this fix didn't work. Hoping this can get fixed real SOON.



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



  • 26.  RE: Cannot copy/paste from another program into syntax editor

    Posted Thu January 25, 2024 09:29 AM

    I have also updated to version 29.0.2.0 and though I have a sense the problem occurs less often, it is definitely still happening. Windows 11 Pro Version 23H2 22631.3007



    ------------------------------
    Joe Twyman
    ------------------------------