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 / Order of rows getting ...
Power Automate
Unanswered

Order of rows getting added in an Excel

(1) ShareShare
ReportReport
Posted on by 2
Background- I have created a flow which takes input from MS Forms and adds a new row to an Excel Sharepoint file. This is working as expected.
 
Challenge- In our org, the excel file that needs to be updated should be able to accept manual entries (rows) as well. Now, let's say we already have 10 rows filled out in the excel file. And let's say form entries have populated row 11,12 and 13 and manual entries have been made to row 14 and 15. Now when the form gets submitted, the new input gets recorded in row 14( below the last form updated row) and pushes the data in the manual entry row to row 15 and 16. What I am looking for is that the new form entry row gets populated in order (in this case row 16).
 
Hope I made sense. I would appreciate if there are any suggestions to help with this. 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,335 Super User 2025 Season 2 on at
    Hi
     
    Are the folks whom are adding manual entries, moving the Table itself? What I mean is, you have a Table around the data, so that it covers the rows you have.
     
    But if the users are simply manually adding rows, and NOT doing an Add Row action from within the Table, then you will always have this issue, because the flow sees the table, but the bottom of the Table has NOT been moved by the manual entry people.
     
    You'd have to create a script in Excel, to check if the table isn't expanded for the manual entries and then does that and you would call this before adding new rows, or you need to educate the users on adding rows into a table not just adding rows into the sheet.
  • Suggested answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
    Check out the following steps:
     
    • Retrieve All Rows from the Excel Table: Use the "List rows present in a table" action to retrieve all rows from the Excel file stored in SharePoint.

    • Identify the Last Row with Data:  Loop through the rows and identify the last non-empty row, which can either be from form entries or manual entries. This ensures that the flow knows where the next available row is.

    • Determine the Next Available Row: After finding the last row with data, calculate the next row number that should receive the new form submission, ensuring it doesn't overwrite any manual entries.

    • Add New Form Entry: Use the "Add a row into a table" action and add the form submission to the next available row (in your example, row 16), ensuring manual entries are not pushed down.

    • Handle Empty Rows:  Ensure that the flow checks for empty rows between existing data, and always appends the new data at the end of the table without affecting manually added rows.

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