+ Reply to Thread
Results 1 to 8 of 8

Download xlsm file from Google Drive

  1. #1
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Download xlsm file from Google Drive

    Hi,

    I've copied a code from the internet (many sites has the same code, one example is here) then try it but fail.

    This is the code :
    Please Login or Register  to view this content.
    at line WinHttpReq.send, after a few seconds it show an error :
    Run-time error '-2147024891 (80070005)':
    Access is denied
    What I've tried so far :
    1. checked that the file in Google Drive has permission "Viewers and commenters can see the option to download, print, and copy"
    2. fill the "username", "password" just before line WinHttpReq.send with google username and password

    But I still get the same error.

    The URL itself, if I paste it in the browser address then the browser download it directly.
    What did I do wrong ?

    Any kind of help would be greatly appreciated.
    Thank you in advanced.

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Download xlsm file from Google Drive

    I tried the URL and this is the message
    Not Found
    Error 404

    Please provide a valid URL with valid ID so as to test.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: Download xlsm file from Google Drive

    Hi YasserKhalil,

    I'm sorry I can't give the URL as it's a company's file where the company gave me the link.

  4. #4
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: Download xlsm file from Google Drive

    I'm sorry, please never mind the question.
    I found a different code from this link and it worked :

    Please Login or Register  to view this content.
    Thank you.

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Download xlsm file from Google Drive

    Are you sure the file is downloaded rightly? .. I tried this with a link and that doesn't work for me ..
    I just changed the id part with mine but didn't work..
    This was working for me before but I don't know what happened ..

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Download xlsm file from Google Drive

    This is ther format that worked for me
    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: Download xlsm file from Google Drive

    Ok... I will try that.

    Thank you, YasserKhalil

  8. #8
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: Download xlsm file from Google Drive

    Quote Originally Posted by YasserKhalil View Post
    Are you sure the file is downloaded rightly?
    With the second code I found in the internet, yes - it downloaded rightly.

    .. I tried this with a link and that doesn't work for me ..
    I just changed the id part with mine but didn't work..
    in my side, it worked seamlessly.

    The first code (using "Microsoft.XMLHTTP" object) not work in my side.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA download a file from on FTP and to uploaded to Google drive.
    By starlev in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2020, 05:34 AM
  2. Upload file to google drive
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-04-2019, 01:21 PM
  3. Upload/download file from/to Google Drive (2)
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-08-2019, 04:32 AM
  4. Upload/Download file to/from Google Drive
    By TudyBTH in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2016, 07:22 PM
  5. Upload .csv file to google drive
    By paladin776 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-21-2016, 03:10 AM
  6. File download from google drive and dropbox
    By patz006 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-26-2015, 10:02 AM
  7. Download workbook from Google drive in ONE line not working
    By snattrass in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-03-2015, 09:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1