Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with Pasting Dataset

    I successfully pasted a dataset from Excel into Stata, but at a certain point I accidentally ran my entire unfinished do file, which cleared the data. Now, I cannot paste anything copied from Excel. I do not think that my clipboard is even changing, but I am not sure nor do I know how to confirm this.
    Is this an issue with my computer, or am I using Stata wrong? My shared L drive through which I open files in Stata is also malfunctioning, so I cannot import my file with code.

  • #2
    This serves as a good illustration of why manipulating data by copying and pasting is, to use George Orwell's phrase, "double-plus ungood." <grin> Problems with your access to files on your (apparently) networked system is unlikely to be anything Stata specific, and none of us can know exactly what you did in order to guess what happened to you. The problem you describe sounds more like a problem with Excel, and/or possibly a problem with something odd on your networked system.

    What I'd suggest here is to start over, and instead of copy/pasting, using -file import excel- to bring the file into Stata, which among other advantages, would leave a trail of messages that would be helpful in diagnosing problems like what you are experiencing. If that would cause to lose a lot of work, that's one of the difficulties that goes along with working via copy/paste. For the future, you might find it useful to know that almost no one who is experienced in data management will use copy/paste as a way to move data between programs. If that's the only mechanism for such transfers with which you're familiar, getting someone to help you learn more reliable and reproducible methods would be a good thing.

    Comment


    • #3
      I successfully pasted a dataset from Excel into Stata
      Don't do this.
      am I using Stata wrong?
      Yes. Well, I guess "wrong" is a bit of a subjective term, and so long as the code does as you desire, I guess it can't be wrong, but, there are practices experienced people do in Stata more often, and using "import excel" is one of those things when we're dealing with excel files. No copying and pasting, that isn't a thing you should do with Stata.

      Comment


      • #4
        Sometimes those shared drives have back-ups. If you right click on them, you can click on "restore previous versions". That option has saved many lives. Good luck.
        Last edited by Jorge L. Guzman; 08 Feb 2023, 09:44.

        Comment

        Working...
        X