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
Answered

Update Excel from SQL

(0) ShareShare
ReportReport
Posted on by 4

I am trying to mirror an excel file from a SQL database. If the SQL entry does not exist in the excel file, it will 'add row into table'. If it does exist , then it will 'update a row'. But it just keeps adding rows.

see below. please advise

Categories:
I have the same question (0)
  • Verified answer
    v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @jjpreston29 ,

     

    You could add a unique column in the excel table as a key column to check if the record exists.

    Then you could use Filter to filter records in a table by the value of the key column in Sql table.

    Use length() function to check if the record exists, if yes, update record; if no, create a new record.

    If the type of key column is number, you could remove the single quote outside Dynamic content. And the unique column could not be empty.

    Image reference:

    35.PNG36.PNG

    Hope this helps.

     

    Best Regards,

  • jjpreston29 Profile Picture
    4 on at

    Thanks  - your method works. I could see from the error that my filter was not working because my unique key in the excel was "Circuit-ID" - and it did not like the "-"

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard