Hey everyone!
I have a flow built which runs a series of ExcelScripts. It has been running fine for the past 4-5 weeks.
Initially, when i went to re-read the ExcelScript - It decided that "ExcelScript" wasn't a valid namespace? Even though my usage of it is a direct copy of the examples provided. This caused around 2-3 Hours of unnecessary debugging, afterwards simply selecting everything - Cut'ing - then Paste'ing - And a final re-save of the script sorted that out. However...
Today it failed, and it failed on a step that is unchanged in the script;
We were unable to run the script. Please try again.
Runtime error: Line 4: Cannot read property 'getUsedRange' of undefined
The line in question is here from the ExcelScript in question;
let selectedSheet = workbook.getWorksheet("src_people");
let usedRange = selectedSheet.getUsedRange();
Running this script manually with some dummy data works fine, the getUsedRange(); runs as expected and the data returned is correct. However - ONLY in this past week - power Automate decided selectSheet is undefined?... There is zero information on this from what I could find between here/stack overflow/reddit etc.
The sheet is named "src_people", I have checked and confirmed this (It runs manually).
I have tried selectedSheet.getUsedRange(true); , Nothing changed, same error.
I have tried workbook.getWorksheet("src_people").getUsedRange();, Nothing changed, same error.
I have tried workbook.getActiveWorksheet().getUsedRange();, Nothing changed, same error.
I'm of the opinion I shouldn't have to change ANYTHING, as this flow has run fine - unchanged - for 4-5 weeks.
E* If there was an update behind the scenes id love to be pointed to where I can monitor these changes. Its expected that things develop but not at the cost of existing function.