How can I detect new row or updated row in Google Sheets through the api? - google-sheets-api

Can anyone help me figure out how to detect new row or updated row in a Google sheets through the api ? Something like a webhook ?

I think you can only do it with the help of Apps Script. You can use a trigger here to detect if something is change in your spreadsheet. The triggers let Apps Script run a function automatically when a certain event, like opening a document, occurs. Simple triggers are a set of reserved functions built into Apps Script, like the function onOpen(e), which executes when a user opens a Google Docs, Sheets, or Forms file. For more information, check this related SO question.

Related

Is there a SpreadsheetApp.flush() option for the Google Sheets API?

I have a spreadsheet that I send data to it, I generate a 1-minute sleep (import time → time.sleep(60)) in the code to make sure that the calculations have all been done and then I copy the result of these calculations to another page of that same spreadsheet.
In Google Apps Script there is the SpreadsheetApp.flush() option to make sure that everything in the spreadsheet is perfect to continue the code.
But what about when we use the Google Sheets API, is there a way to do this instead of putting a sleep with a random value like I do?
I was curious about that too, so I reviewed the documentation, and it seems that there is no flush() method for Sheets API.
However, I found a workaround that might help so you can make sure that you are working on the latest version of the sheet. I took inspiration from the Writecontrol parameter in Google Docs API.
"Determines the revision of the document to write to and how the
request should behave if that revision is not the current revision of
the document."
So what I was thinking is to use the Drive API Revisions by using the Revisions: list method and get the latest version of the Sheet. After that, use Revision: get to retrieve the latest version of the sheet to work on it.
You can also submit a missing feature, Google might add this method to the Sheets API later on.
Reference:
Flush() method.
Writecontrol Google Docs API.
Changes and revisions overview.
Revisions: list.
Revisions: get.

Send data from list in SharePoint in Microsoft 365 to external API

I have a list in "SharePoint in Microsoft 365" and am looking to extend its usefulness. I would like to create a button or something that can take a row of data and send it to an external site via API (another tool that we have created).
To be clear:
SharePoint initiates a GET or POST request
the request must have row or field data attached
the destination is outside of Microsoft/SharePoint
Can it be done?
(Apologies if this is a repeat question, I could only find answers that pertained to older versions of SharePoint and focused on hitting external APIs to retrieve data, not send it.)
OK, i think the best choice to send Data from a selected row, is to use the ListView Command Set here you can do anything with #pnp/nodejs.
Otherwise...
PowerAutomate can help send data.

Control IE as another user from Excel

My sccenario is as follows:
I have an excel workbook that does a lot of stuff, like create users and such.
A part of this "create user"-procedure is to edit some info on a website.
BUT this website needs to be launched as another user which has access to it.
I have no problem controlling IE if I launch it normally with the current user. But when I launch IE as another user, I cant take control of it from Excel.
I have done a lot of googling and tried a lot of stuff.
Fx. code from the following sources:
http://www.makeuseof.com/tag/using-vba-to-automate-internet-explorer-sessions-from-an-excel-spreadsheet/
http://www.excely.com/excel-vba/ie-automation.shtml
http://www.mvps.org/emorcillo/en/code/vb6/iedom.shtml
None of which has worked in my scenario.
I found a very good workaround here: https://superuser.com/a/49462
Basically I found out that it's possible to force a loginprompt on pages using Windows Authentication, and then log in as a different user.
That means that the IE process still runs as my user, thus making it possible to take control of the window from Excel.

Complete Online Form Query And Store Result In Microsoft Access

I hoping to develop a simple database to store the results of OFAC searches in an Access database. The steps that I'm hoping to achieve follow:
Enter company name in Access form
Execute query (via clicking a button or otherwise)
Goto OFAC website (OFAC Website)
Enter Company name in Name Field
Execute a search by clicking Search button or hitting return.
Receive the result set and Store in Access table
Questions:
Can I accomplish these steps with Access
Are you aware of any resources (articles, Access add-ins, VBA Scripts) that can help me achieve these objectives
Thanks for your help
Yes, it's possible. OFAC provides access to data using web service API, which can be called using VBA. I didn't use VBA for accessing OFAC, but used with other web services. Search string "ofac list api" gives a lot of links, for instance here you can find code example for VB6, it's similar to VBA, may be useful.

How to get web data which can be opened from a specific website into a different tab in excel

I wont to pull data from a webpage on the basis of a criteria's into excel however I am unable to do so.
Website from which I wont to pull data can be logged in only via another website and not by just url.
For E.g. My site name is Elsc and to login into it I have to via another site Gatekeeper and elsc cannot be logged into in any other way.
So is there a solution to get data from such website by Macro.
Thanks in advance :)
I don't think Excel will give you this kind of control (controlling one URL from another URL). I tried to do this a long time ago; it never worked right. Can you just login to that URL and then run a simple VBA script to download the data? Also, consider using a Power Query to do this for you.
http://chandoo.org/wp/2015/08/21/import-web-data-power-query/