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 / How to write values to...
Power Automate
Unanswered

How to write values to multiple rows in excel when using "write to excel worksheet"

(1) ShareShare
ReportReport
Posted on by 10

I am reading from two excel worksheets in my flow, and writing the data from those into a third new one (merging the data).

The issue is that the merged data is only writing onto row 1

The problem is because the "Write to Excel worksheet" action I have is set to write the data there and I know that is wrong...

But I can't see how to write the data onto rows using the other "write mode" options (e.g. on currently active cell, on named cells), so that each value has its own cell in rows in column A.

Do I need to initiate a variate and set a counter to do this, or can this be done within the write action?

Screenshots attached below for reference - One contains the output with the issue (data all on one row) and one screenshot shows how i want the data to be written (row by row in column A) 

Thanks for any help

I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at

    If you want to write to multiple rows in excel then the variable has to be either a list or datatable. Then with "On specified cell" writing mode you give it cell that the list or datatable starts from.


    Your mergedData2 is just string of text so if you write it on Column A Row 1 then the whole text will be in that one cell. You might want to have the "mergedData2" as a list.
     
    In your Set variable you are settin mergedData2 to be string of opening and closing square brackets.

     
    If you want it to be empty list then add percent signs around the square brackets like: %[]% or use create a new list -action.
     
     
    And merged data should looke like this:

     
    Or just go with the list actions:
     


     
     
    If you have the data as a list or datatable then you can write that into Excel column A row 1 and then the list will be one item per row like so:
     

     
    Example 2:


  • SH-04111327-0 Profile Picture
    10 on at
    Thanks so much for your help, this process worked for me!
     
    For reference, another mistake I was making was when I was trying to add variables or lists, instead of following the syntax
    %mergedData + mergedData2%
    I was doing 
    %mergedData% + %mergedData2%
    Closing each variable off with the % was obviously causing issues 
     
    Your advice on using a list and using the % sign around the [] parenthesis to create the empty list worked too :) really appreciate it! 

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