Announcement

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

  • import excel: errors when importing xlsx files in Stata 15.1

    I recently upgraded to Stata 15.1. In my previous versions, I was able to run "import excel" on xlsx files without error, but now I always get errors, even when running code that ran under previous versions. I can post an example, but let me start by asking whether there are any known bugs or backward compatibility issues with "import excel".

  • #2
    Here's an example. The following code --
    . import excel "State_PE_mandates, long format, v4.xlsx", sheet("PE_Physical Activity") cellrange(A3:Q113) firstrow
    -- when run on the attached xlsx file, returns the following errors:
    _xlshreadstringcolforce(): 3253 nonreal found where real required
    import_excel_get_first_row(): - function returned error
    import_excel_load_file(): - function returned error
    import_excel_import_file(): - function returned error
    <istmt>: - function returned error
    r(3253);
    Before getting too into the details of this particular xlsx file, I should say that the same code ran on the same file in a previous version of Stata (13 or 14). And I should say that in Stata 15.1 I am getting errors every time I run "import excel" on any xlsx file.
    Attached Files

    Comment


    • #3
      I could not reproduce your error. Can I see the output from the about command?

      Code:
      . about
      
      Stata/MP 15.1 for Windows (64-bit x86-64)
      Revision 18 Apr 2018
      Copyright 1985-2017 StataCorp LLC
      
      Total physical memory:    66244972 KB
      Available physical memory: 59629724 KB
      
      Unlimited-user 8-core Stata compute server perpetual license:
             Serial number:  1
               Licensed to:  Kevin Crow
                             StataCorp
      
      . import excel "State_PE_mandates, long format, v4.xlsx", sheet("PE_Physical Activity") cellrange(A3:Q113) firstrow

      You should update Stata. If that does not work, you might try running the Stata's Installation Qualification Tool on your install.

      https://www.stata.com/support/instal...qualification/

      Comment


      • #4
        Hello I have the same problem with the same error message on Stata/IC 15.1. I cannot update my version. Any thing else I can do to get my database on excel?

        Comment


        • #5
          My code is as follows: import excel using FORSTATA.xlsx, sheet("for_stata") cellrange(a1) firstrow clear
          _xlshreadstringcolforce(): 3253 nonreal found where real required
          import_excel_get_first_row(): - function returned error
          import_excel_load_file(): - function returned error
          import_excel_import_file(): - function returned error
          <istmt>: - function returned error

          Comment

          Working...
          X