'' This was an attempt to read
'   the Google sheet using only vbs
'   It doesn't work. I keep getting a 'not found' error

'   I'm pretty much giving up on this page

Dim apiKey
apiKey = "AIzaSyDEszMxL8DKfbKX_cvUsQtUD5w8wUsTtUU"

Dim sheetID
sheetID = "1787246000"

Dim sheetRange
sheetRange = "Players_A!A1:K30" ' Replace this with the desired sheet and range

Dim requestUrl
requestUrl = "https://sheets.googleapis.com/v4/spreadsheets/" & sheetID & "/values/" & sheetRange & "?key=" & apiKey

Dim xmlHttp
Set xmlHttp = CreateObject("MSXML2.ServerXMLHTTP")

' Send the GET request to read data from Google Sheets
xmlHttp.Open "GET", requestUrl, False
xmlHttp.send

If xmlHttp.Status = 200 Then
    ' Successful response
    Dim response
    response = xmlHttp.responseText

    ' Output the data to the console or message box
    WScript.Echo response

    ' Alternatively, process the JSON response or display specific information
    ' ...

Else
    ' Error handling
    MsgBox "Error: " & xmlHttp.Status & " - " & xmlHttp.statusText
    WScript.Echo requestUrl
End If

Set xmlHttp = Nothing

