I'm trying to post a record into a google spreadsheet with following code & the code seems to be working fine but I'm not seeing any records added to my google spreadsheet. Could someone let me know what is the issue with following code?
Also, are there any better ways (apart from xml coding) of updating google spreadsheets from VB?
I've made google spreadsheet public with view/edit capabilities so anyone can update the sheet. (so, I don't think any authorization issue is there)
Currently google spreadsheet had 7 rows & i'm trying to insert another row with values of "testVB", "VBtype" in 2 columns using the following code.
for reference, existing google spreadsheet is located in this link https://spreadsheets.google.com/ccc?...FR0RKcEE&hl=en
here is the code.
Greatly appreciate any help.Private Sub TestXMLHTTP()
Dim strURL As String, s1 As String, s2 As String
Dim oReq As Object
Set oReq = CreateObject("MSXML2.XMLHTTP")
Dim oDOM As Object
Set oDOM = CreateObject("MSXML2.DOMDocument.3.0")
oDOM.async = "false"
Dim myXML As String
strURL = "https://spreadsheets.google.com/feed...1/private/full"
s1 = Chr(34) & "http://www.w3.org/2005/Atom" & Chr(34)
s1 = "xmlns=" & s1
s2 = Chr(34) & "http://schemas.google.com/spreadsheets/2006" & Chr(34)
s2 = " xmlns:gsx=" & s2
myXML = "<entry " & s1 & s2 & "> <gsx:Symbol>testVB</gsx:Symbol><gsx:Type>VBtype</gsx:Type></entry>"
oDOM.loadXML (myXML)
oReq.Open "post", strURL, False
oReq.send (oDOM.XML)
MsgBox oReq.responseText
end sub
Bookmarks