web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Write multiple excel c...
Power Automate
Unanswered

Write multiple excel cell values in a range with Office Script, using data from Power Automate

(0) ShareShare
ReportReport
Posted on by 42

Hi I'm reading excel range data from an excel file with an Office Script:

function main(workbook: ExcelScript.Workbook) {
    let sheet = workbook.getWorksheet("Test AM");
    let range = sheet.getRange("A1:A7");
    let returnData = range.getValues();
    return returnData;
};
This is returning the values to my flow.

I want to write this data to a destination excel file, using the same flow, but I'm not sure how to write the data-writing office script.

I'm trying to include a data array, but it isn't working and intellisense is showing errors:

function main(workbook: ExcelScript.Workbook, data[]) {
  let sheet = workbook.getWorksheet("Sheet1");
  let range = sheet.getRange("A1:A7");
  range.setValues(data);
};
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard