Announcement

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

  • Import Excel error r(603)

    Hi all,

    I am having trouble importing a large excel file in .xlsx (c. 30 megabyte). I want to import one selected sheet only, however, when using "import excel" Stata (14/MP) yields only the error r(603). Does anyone have any clue what to do in such a case?

    Code:
    . import excel "C:\Users\xxx\Data\Datastream_09.03.2018\Company Data_v12.xlsx", sheet("German All Equity Data")
    file C:\Users\xxx\Data\Datastream_09.03.2018\Company Data_v12.xlsx
    > could not be loaded
    r(603);
    I do not plan to convert the file into csv and delimited text at this time.

    Thanks in advance
    Vanter

  • #2
    There is, in version 15.1, a limit on the size of .xlsx files for -import excel- of 40 megabytes. Is "c. 30 megabyte" strictly below that limit? Also, the limit may have been different in version 14--I don't know, so check the PDF documentation for what the limit is in that version.

    Assuming you are not over the size limit, there are a few possibilities:

    1. Do you have the file and directory read permissions needed? (Simple test: can you open the file directly in Excel?)

    2. Perhaps somebody else has opened the file and has it locked. (Again, try opening in Excel: you will get a message to this effect if this is the problem.)

    3. Perhaps the file is corrupted in someway? (Does it open properly in Excel, or in some other application?)

    4. Is the file password-protected?

    Comment


    • #3
      You might also be sure you don't have the file open in excel at the same time you try to load it. This shouldn't create a problem, but might.

      Sometimes it helps to clean up the excel file. If you only want one sheet of a very large multi-sheet file, it might be worth trying to copy and paste that single sheet into another excel file, and then save and try to read the newer file.

      Comment

      Working...
      X