I have an excel workbook in which I have selected the "Get Data" option to import from an OData Feed. Using a public odata feed for testing. This defines a query in excel that can be edited/viewed through Power Query Editor.
I am new to office script. I would like to write an office script that loads the data from the query into a specified sheet. Could you please guide me through a sample code how to reference a query defined in the workbook and load its data into a sheet/range?
Also how can I configure this script to execute on file open event?
Thanks.