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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Write data in excel

(0) ShareShare
ReportReport
Posted on by 48

YeuHarng_0-1691740441273.png

hi, any ways to reduce my step? and the data write inexcel how can i write if i want this 2 things write in a first free flow and the specific column

 

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    What exactly do you want to reduce? You only have 4 steps here. You will not be able to do it in less steps, because even if you write a single JavaScript function that returns both results to you, they will be returned as a string, and you will need to split it and process it before you can write it to Excel. No way to do it in less steps than you already do.

     

    And you are already writing it to specific columns and the first free row. Not sure what you mean by your question regarding that.

    -------------------------------------------------------------------------
    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.

  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    If I understand your question, you want to add 2 values into one row, but because you use two activities you are adding into two seperate rows?

     

    You could workaround this, but it will actually be more than 4 steps. You can add a step where you combine both value Name and Position into one value, for example a datatable which has 3 columns. After that you can append this column to your Excel/CSV sheet as you like. 

     

    Good luck. If you need questions or if you can clarify your question, feel free to do so. 

  • YeuHarng Profile Picture
    48 on at

    Because in webpage for example have 12people details ,and one people details like this pic for example need 4step then 12people I will have 48 action in my subflow is that ok for many action in the subflow?

    And also for the step for put 2 values into one row , is that possible to do in one actions?

     

  • YeuHarng Profile Picture
    48 on at

    my question is i want add 2 values into one row , in my screenshot ,have 2 actions , that also can write into one row but different column, i just want reduced the step is that possible? Because in a webpage have  12people details ,and one people details like this pic for example need 4step then 12people I will have 48 action in my subflow is that ok for many action in the subflow? I just want confirm if many actions in one subflow is that ok?

  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    You are on the right track,

     

    I have been webscraping a lot aswell and i would take this approach if i was you:

    1. First scrape all the details of 12 people.

    2. After you scraped all values, merge them into one value like in a datatable or a list.

    3. Now you can add this datatable or list to your Excel sheet (or use CSV and then transform the CSV to Excel)

     

    This will take logically 14 steps.

    12 steps to retrieve data

    1 step to merge them into 1 value

    1 step to add this value to your sheet.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Well, you would need to put this set of actions inside a loop, obviously, so that it runs for all items in the web page. You could probably use Extract data from web page to extract all items at once, instead of using JavaScript. Then loop through all items and write them into Excel.

     

    You cannot really write both values in a single action, because those values are supposed to be written into columns that are not next to each other.

    What you could do, however, is if you retrieve data via Extract data from web page and get a data table with two columns, you could in fact write the entire column at once. You would need to use Retrieve data table column into list to get a list for a single column and then write that to column 1 in Excel. Then repeat the same for the other column.

    This would effectively mean you could do it all in 5 actions:

    1. Extract data from web page
    2. Retrieve data table column into list (for the first column)
    3. Write data to Excel worksheet (for the first column)
    4. Retrieve data table column into list (for the second column)
    5. Write data to Excel worksheet (for the second column)

    If the columns in Excel were next to each other (i.e. if you were writing into columns 1 and 2), you could in fact write the entire table at once, effectively doing it all in two actions:

    1. Extract data from web page
    2. Write to Excel worksheet

    -------------------------------------------------------------------------
    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.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    This is honestly extremely inefficient and not dynamic at all - will not work with a changing number of items in the web page. Also, there really is no need to have an intermittent CSV file that is then transformed into Excel. Finally, the fact that the OP is asking about writing into the first free row, it clearly means that it's an existing Excel file that already contains some data and new data needs to be added. So, having a CSV converted to Excel does not work here at all.

  • YeuHarng Profile Picture
    48 on at

    yes i know can use the function , extract data from webpage but for this webpage there have a div put infront the text so i can't extract it, so i just use the javascript get one by one . So i just can get the details one by one right?

    YeuHarng_0-1691763694175.png

     

  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    I mean yeah, Fair enough.

     

    I see hes using JS to scrape data (maybe for a reason?) If he can't use extract data from webpage that wont work and he will have to use 12 activities anyway, may that be 12 times an JS action. AND from own experience i would not use extract data from web page when scraping large number of pages because whenever an error occurs within those pages, you can't skip that page (and the flow stops). So actually having 12 seperate actions to scrape (dynamic) and passing them on block error action each was my way to go.

     

  • YeuHarng Profile Picture
    48 on at

    yes i know can use the function , extract data from webpage but for this webpage there have a div put infront the text so i can't extract it, so i just use the javascript get one by one . So i just can get the details one by one right?  
    For my last question, if i use the function extract data from web page, if the webpage data updated is that still can extract the latest data?

    YeuHarng_0-1691763694175.png

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 253 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 172 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 134 Super User 2026 Season 2

Last 30 days Overall leaderboard