Announcement

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

  • importing excel files from google drive

    When I try to import an excel file from a google drive folder (shared with me) using the following line:

    import excel using "https://drive.google.com/drive/folders/0B3qZQokPEPD6ek9Pd1UwbDd5clk/allhlcn901.xls", first

    I get the following error message:

    server refused to send file
    could not open url


    If I open my browser and point to the web address (from this computer or my phone) I get to the folder, so I do not think there is any syntax issue. Perhaps this is a problem of how to reference google drive folders and files properly for import. My hope is that a solution is simple for a Stata user who has encountered this type of problem before.

    (Note: I did not download all the files to a local drive because many of the 25+ files are more than .5GB, and local space is limited.)

  • #2
    Well, I get the same error message from Stata that you got. But when I try to just access that file directly from drive.google.com, I get:

    400.
    That’s an error.

    The requested URL was not found on this server. That’s all we know

    Comment


    • #3
      Yes. It seems the link to the file is not simply the "folder address /filename"... I'll need to ask Google I guess.
      Thanks.

      Comment


      • #4
        Today I tried
        . webuse set "https://drive.google.com/drive/folders/0B3qZQokPEPD6ek9Pd1UwbDd5clk/"

        . webuse "allhlcn901.xlsx", clear /*note error in file name from my prior post*/

        and got back:

        server refused to send file
        r(672);

        Does this mean that Stata connected, found the file, and was denied access to download it?
        Or does could this mean that Stata is just generically unable to complete the task?

        Comment


        • #5
          But, once again, when I try to access that URL from my web browser (https://drive.google.com/drive/folde...llhlcn901.xlsx) Google responds with:

          400. That’s an error.

          The requested URL was not found on this server. That’s all we know.

          Comment


          • #6
            I just brute forced my way around Google Drive for now. I cleared disk space.

            Comment

            Working...
            X