This will kill a few Python jobs and make it a very popular REST client =)
This will kill a few Python jobs and make it a very popular REST client =)
Could also do some crude/fragile parsing with aforementioned regex functions.
I was just going to copy/paste the fields into JSON which is repetitive and error prone, and realized I could automate it. So I wrote VBA to output a json version of that. (The annoying part of writing that in VBA is that JSON data needed a lot of double-quotes, but then you have to use escape sequences for every double-quote.)
Once I had the JSON data generated, I was going to post each one manually, so again, I looked and realized you can POST the data directly from VBA. Added a button to the page and you could update the data in Excel and click a button to POST it.
Of course, once I turned it over to someone else, they were like "what the hell" and started doing it a different way. lol
It's just (utterly ancient) Javascript (I think ECMAScript, technically, since there's no DOM, no browser, etc.), bolted on. I wrote in modern JS and used Babel to transpile the source back into the stone age.
… I'd much rather write Python.
https://support.microsoft.com/en-gb/office/get-started-with-...
Microsoft's advice page for wrapping Office in a web application fronted by ASP/ASP.Net: https://support.microsoft.com/en-us/topic/considerations-for...
And that has links to documentation about Excel Web Services of old (on-premises SharePoint days, not sure if it translates to today's cloud), which is SOAP/HTTP: https://learn.microsoft.com/en-us/sharepoint/dev/general-dev...
https://learn.microsoft.com/en-us/graph/api/resources/excel?...