4.1 VBA osnove

Dostop do podatkov z VBA kodo (Excel, Access, Word).

HTTP zahteva

Function GetData(url As String) As String
    Dim http As Object
    Set http = CreateObject("MSXML2.XMLHTTP")
 
    http.Open "GET", url, False
    http.send
 
    GetData = http.responseText
End Function

Primer klica

Sub TestGateway()
    Dim json As String
    json = GetData("http://localhost:5000/api/v1/dsn/demo/tables")
    Debug.Print json
End Sub

Razčlenjevanje JSON

Za razčlenjevanje JSON priporočamo: VBA-JSON Library

Dim data As Object
Set data = JsonConverter.ParseJson(json)
Zuletzt geändert: dne 29.01.2026 ob 23:25