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 Platform Community / Forums / Power Automate / Best Way to Update Row...
Power Automate
Answered

Best Way to Update Rows in Excel with Data from SQL?

(1) ShareShare
ReportReport
Posted on by 4
Hi everyone,
 
I have an Excel sheet with user details, containing around 1500 rows. Every week, I run a query against SQL, which returns about 30 rows of modified data. My goal is to update the existing rows in Excel based on the data from SQL.
Here’s my current setup:
 
  • I update every column in Excel, except for the "Include" column, which should remain unchanged.
  • To update the rows, I check whether each SQL row matches the corresponding Excel row by comparing on the "ID_ProvetUserID" column.
However, this process is incredibly slow because it ends up checking 1500 x 30 = 45,000 cases. Does anyone have suggestions for a more efficient way to handle this? My column ID_ProvetUser_ID is unique.




 
Categories:
I have the same question (0)
  • Verified answer
    lbendlin Profile Picture
    8,649 Super User 2026 Season 1 on at
    Define the table in Excel, and then run a SQL query against that table with just the updates.
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
    Hi
     
    I would do it in reverse.
     
    1. Run your SQL Query
    2. Add an Apply to each for the returned rows
    inside
    2a. do your List Rows, based on a Filter from the SQL Apply to each, and that unique id you said you have
    2b. use a condition to see if you received 1 row
    in the Yes (got 1) Update it
    in the no (add it)

    Now you did zero loops on Excel and only 30 loops on sql
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard