Hi there, I tried this but I can only then get the body of the return in my PA flow.
I have changed the code which appears to be working to extract the data I need but I am struggling with the output of the string array and how to then use this is my second script.
First Script to Extract the data from the worksheet:
function main(workbook: ExcelScript.Workbook, sheetName: string): SelectedValuesToReturn {
let range: ExcelScript.Range = workbook.getWorksheet(sheetName).getRange("A1");
let currentRegion: ExcelScript.Range = range.getSurroundingRegion();
let values = currentRegion.getValues() as string[][];
let address_out: string = currentRegion.getAddress();
return { address_out: address_out, values_out: values }
}
interface SelectedValuesToReturn {
address_out: string,
values_out: string[][]
}
when I add a run script action I can see the outputs in a compose action:

Second script to add the data into a new worksheet in a separate workbook:
function main(Workbook: ExcelScript.Workbook, sheetName: string, address: string, values: string[][]) {
let range = Workbook.getWorksheet(sheetName).getRange(address);
if (values.length === 0) {
return;
}
let resizedRange = range.getAbsoluteResizedRange(values.length, values[0].length);
resizedRange.setValues(values);
}
when I look at the parameter for the values in the second script in my flow it does not show the values_out output from the script:

If I use the compose output (which uses the values_out returned from the first script) I just get the string value of the returned string array in cell A1:

The aim is to use two scripts to scape data from one workbook and then add it as a new sheet in the destination workbook.