Announcement

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

  • xlsx could not be loaded

    Hi,

    When trying to import .xlsx files to .dta files i get following syntax:

    file ip1.xlsx could not be loaded
    r(603);

    When copying the cells of the file I want to import to a new file I have no problems importing the copy. However, as I have approx 800 files i want to import this would be a rather tedious process. As importing the copied data works just fine, I'm thinking my files are corrupted in some way or another... any suggestions? I'd prefer not to convert to .csv files.

    Thanks in advance, Lorens

  • #2
    I should note that I'm using Stata17

    Comment


    • #3
      I don't understand the problem. Show me the exact syntax you used to import your files.

      Comment


      • #4
        Yep, here it is:


        . import excel using "ip1.xlsx", clear
        file ip1.xlsx could not be loaded
        r(603);

        Comment


        • #5
          try typing
          Code:
          search r(603)
          and see if that discussion helps re: permissions, other users, etc.

          Comment


          • #6
            If you're using Windows you might check that you don't have the file open or Windows doesn't otherwise have the file locked - for example if Dropbox is trying to sync it.

            Comment


            • #7
              I've found the problem and it is unrelated to stata. Thanks for the answers anyways!

              Comment


              • #8
                What was the problem?

                Comment


                • #9
                  Hi Jared,

                  I had exported the aforementioned datasets from the online database Orbis. Apparently, when 'dragging' the files to my desktop from downloads this didn't save the files locally on my mac. Hence, i had to open each document and press save.

                  Comment

                  Working...
                  X