Hi Elgin Green et al, The macro recorder did not capture the refresh links event. However, that does not mean there is no code method for this. Also:
If you write a script that uses .setFormulaLocal() function it performs a cell refresh. Here is my code:
function main(workbook: ExcelScript.Workbook) {
let Sheet1 = workbook.getWorksheet('Sheet1');
// Set range C2 on selectedSheet
Sheet1.getRange("C2").setFormulaLocal("='https://analysisie.sharepoint.com/sites/PowerFlowTesting/Shared Documents/General/Sudhi Murthy/[Events.xlsx]Keys'!C2")
let cellC2Object = Sheet1.getRange('C2')
cellC2Object.calculate
}
2. Alternatively, there is a "URL interface" methodology within Office Scripts which might be a way to create these links and then access a .refresh() method.
3. Yet another, alternative, solution is to use Power Automate to obtain your source data (put it into an array) and, then, either use an Office Script to populate a range, in your workbook, or use the Flow's Excel Connector :"Update a row".