Sub 下載()
'從google drive下載檔案
Dim myURL As String
Dim WinHttpReq As Object
myURL = "https://docs.google.com/spreadsheets/d/1v4Me4vd9nviQ6nLAm9L7Ax5RVYEZOf-Bw563HZVUiIs/pub?output=xlsx" '來源檔案
Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
WinHttpReq.Open "GET", myURL, False
WinHttpReq.Send
myURL = WinHttpReq.ResponseBody
If WinHttpReq.Status = 200 Then
Set oStream = CreateObject("ADODB.Stream")
oStream.Open
oStream.Type = 1
oStream.Write WinHttpReq.ResponseBody
oStream.SaveToFile ("D:\1000.xlsx")
oStream.Close
End If
End Sub作者: pideo 時間: 2015-11-4 22:25
小弟找到解決方法了
google app有提供一個Direct Link的外掛
可以直接將全部上百個excel檔的網址一次全部直接解析出來
直接全部複製使用就可以了作者: z135426 時間: 2015-11-6 22:33