設為首頁收藏本站Access中國

Office中國論壇/Access中國論壇

 找回密碼
 注冊

QQ登錄

只需一步,快速開始

返回列表 發(fā)新帖
查看: 2374|回復: 0
打印 上一主題 下一主題

由 google云端硬碟 下載文件

[復制鏈接]
跳轉到指定樓層
1#
發(fā)表于 2014-6-30 10:12:16 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
   由 google云端硬碟 下載文件
   我的VBA 如下:

Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long


Dim strURL As String
    Dim strPath As String
    Dim strFile As String
   
    strFile =  "123.xls"
    strURL = "https://drive.google.com/?tab=wo&authuser=0#my-drive/" & strFile
    strPath = "C:\xls\" & strFile
    Ret = URLDownloadToFile(0, strURL, strPath, 0, 0)
    If Ret = 0 Then
        MsgBox "File successfully downloaded ok "
    Else
        MsgBox "Unable to download the file"
    End If

執(zhí)行結果 C:\xls\   的  123.xls   是空的( 沒有 工作表 )。
請教大大 要如何修正?
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享分享 分享淘帖 訂閱訂閱
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則

QQ|站長郵箱|小黑屋|手機版|Office中國/Access中國 ( 粵ICP備10043721號-1 )  

GMT+8, 2024-10-23 08:23 , Processed in 0.222565 second(s), 24 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回復 返回頂部 返回列表