I'm using Office Scripts to pass an Excel cell value stored in SharePoint to Power Automate. It works great for one cell, but I can't figure out how to pass multiple cell values. Here's my current Office Script that gets the value in cell B3. When I call this from Power Automate, I can refer to the "result" dynamic content from the Run Script action to get the B3 value.
I need to also pass the values of cells B4, B5, B11, B12, and B44 to Power Automate. How can I do that?
function main(workbook: ExcelScript.Workbook) {
// Get the current worksheet.
let selectedSheet = workbook.getActiveWorksheet();
let CustomerName = selectedSheet.getRange("B3");
return JSON.stringify(CustomerName.getValue());
}