Hello, I am trying to test Google Sheet API update functionality using VBA (VBscript).
I have a *public* test sheet *published to the web* (access level "Public on the web - Anyone on the Internet can find and edit"). I assume there is no need for authentication because of this. Here it is: *https://docs.google.com/spreadsheets/d/1L8OcwRByppPUFVUaq2ET5JHeahgt0bm85EJ2gNpGsuE/edit#gid=0* I can retrieve the sheet's xml by using this vb code: URL = "https://spreadsheets.google.com/feeds/cells/1L8OcwRByppPUFVUaq2ET5JHeahgt0bm85EJ2gNpGsuE/1/public/full" Set x = CreateObject("Microsoft.XmlHttp") x.Open "GET", URL, False x.send "" WScript.Echo x.responseText Set x = Nothing Then I put together a simple xml to update a value in a single cell B2 (R2C2) and saved this xml to a textfile ("textupdate.txt"): <entry xmlns="http://www.w3.org/2005/Atom" xmlns:gs= "http://schemas.google.com/spreadsheets/2006"> <id> https://spreadsheets.google.com/feeds/cells/1L8OcwRByppPUFVUaq2ET5JHeahgt0bm85EJ2gNpGsuE/1/public/full/R2C2 </id> <link rel="edit" type="application/atom+xml" href= "https://spreadsheets.google.com/feeds/cells/1L8OcwRByppPUFVUaq2ET5JHeahgt0bm85EJ2gNpGsuE/1/public/full/R2C2" /> <gs:cell row="2" col="2" inputValue="FFF"/> </entry> Finally, I was trying to process the update from another VBscript: Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("C:\Users\xxx\Desktop\testupdate.txt", 1) strXml = f.ReadAll f.Close URL= "https://spreadsheets.google.com/feeds/cells/1L8OcwRByppPUFVUaq2ET5JHeahgt0bm85EJ2gNpGsuE/1/public/full" Set x = CreateObject("Microsoft.XmlHttp") x.Open "PUT", URL, False x.Send strXml WScript.Echo x.responseText WScript.Echo strXml Set fso = Nothing Set x = Nothing Set f = Nothing ...However I keep receiving a response "Google Drive -- Page Not Found". I would appreciate any help with this... Thanks in advance! -- You received this message because you are subscribed to the Google Groups "Google Spreadsheets API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
