Я использую parseJSON для импорта данных JSON в Excel из скрипта Google App путем выполнения запроса GET.
Данные JSON выглядят так:
{"user":[{"Name":"Keshav","id":"1"},{"Name":"Nandan","id":"2"}]}
Вот мой код VBA, и он показывает ошибку 70 Отказано в доступе:
Private Sub CommandButton1_Click()
Dim http As Object, JSON As Object, i As Integer, VBA As String
VBA = "Google app Script link"
Set http = CreateObject("MSXML2.XMLHTTP")
h = 2
http.Open "GET", VBA, False
http.Send ' Showing error in this line: 70 Permission denied
Set JSON = ParseJson(http.responseText)
For Each Item In JSON("values")
Sheet1.Cells(h, 4) = JSON("Name")
Sheet1.Cells(h, 4) = JSON("id")
Next
End Sub