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 / Converting Column Data...
Power Automate
Unanswered

Converting Column Data to Row Format in Excel Using Power Automate: Seeking Help

(0) ShareShare
ReportReport
Posted on by 11

I have extracted some data using web scraping and it is currently written to an Excel file in a column format like this:

Example

1

2

3

4

However, I want to convert this data into a row format so that it looks like this:

 

Example, 1, 2, 3, 4

What settings in the "Write to" step can I do to achieve this?

 

Thank you for your help! 

I have the same question (0)
  • Steve48 Profile Picture
    431 on at

    Write  a loop to iterate through the columns

    Steve48_0-1699400722409.png

     

  • UshaJyothiKasibhotla Profile Picture
    203 Moderator on at

    Try by following this 

    Launch excel sheet

    Read excel sheet 

    Loop through it by for each

    And then use write to excel sheet inside cureach

    Give value to write currentitem[columnname or index]

    This is the basic method 

    However you can use linq also 

     

    Hope this helps

    Usha

  • UshaJyothiKasibhotla Profile Picture
    203 Moderator on at

    I have created a flow as per your requirement

    please follow the steps

     

    UshaJyothi20_0-1699423403241.png

    Hope this helps

    Usha

     

  • UshaJyothiKasibhotla Profile Picture
    203 Moderator on at

    This is how to give write to work sheet activity

    UshaJyothi20_1-1699423785333.png

    Hope this helps

    Usha.

  • Srini007 Profile Picture
    3,327 Super User 2025 Season 2 on at

    Hi @PAD_Noob 

     

    Check below link for your reference

     

    https://www.youtube.com/watch?v=4eTsTJzuWUc

     

    If you find this reply helpful, please consider giving it a LIKE AND

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION

     

    Regards,

    Srini

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    This is extremely inefficient. If you then end up writing it as a single data row anyway, there is no point to add those items into a list in the first place. You could simply target each of the values in the Write to Excel worksheet. Also, this approach assumes there is a finite number of values to write, which is not robust at all.

     

    The correct approach would be building a loop that writes each value individually in a separate cell and incrementing a column index. Somewhat like this:

    1. Loop from 0 to %DataFromWebPage.RowsCount-1%, increment by 1, store the index into %LoopIndex%
      1. Write to Excel worksheet the value %DataFromWebPage[LoopIndex][0]% (as it is probably a data table with a single column) into row 1 (or whichever row you want to write it to) and column %LoopIndex+1% (because LoopIndex is 0-based, but Excel columns are 1-based).
    2. End loop

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • UshaJyothiKasibhotla Profile Picture
    203 Moderator on at

    As @Agnius  Said I tried that method too

     

    UshaJyothi20_0-1699434193559.png

    Hope this helps

    Usha

  • PAD_Noob Profile Picture
    11 on at

    Okay, this has worked in terms of writing my web data to Excel in a row form. However, I have a loop going through different links scraping the same data, and it is overwriting row one. How can I make sure that once a row is done, it goes on to the next available row to write? Thanks 

  • PAD_Noob Profile Picture
    11 on at

    @Agnius @UshaJyothi20 
    Here are my steps that are reading from an Excel workbook where I have links stored in it. I have a for each going through each link and grabbing the specific data elements for each web page I want. Now I am just curious about how to not overwrite the first row and to make it add a new row for each instance of data pulled for each URL.

     

    PAD_Noob_0-1699449986086.png

     

  • UshaJyothiKasibhotla Profile Picture
    203 Moderator on at

    Before you use write to excel sheet 

    Use first free row/firstfree coloumn activity and get that first free row and free coloumn in variables give these varaiables in write to excel sheet coloumn and row values.

     

    Hope this helps 

    Usha

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard