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 / Replace Text - Based o...
Power Automate
Unanswered

Replace Text - Based on Excel Sheet

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

New user of power automate.

 

I am writing a process that opens a text file and replaces text based on an excel sheet. Basically any text in Column A, should be replaced with text in Column B. The process does not error, but do not think it is doing anything below the For each loop.

 

PowerAutomate1.png

 

 

Any guidance would be gratefully received.

 

Terry 

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @TerryS 

     

    Did the below process is one you need to do,

     

    you had a text file which contains column A values of excel sheet (not all values , only some). Now you need to replace the column A values in text file with the given column B values (in same row of excel sheet), this is what u need to do , right?

     

    Regards,

    Nived N

  • amamidwar23 Profile Picture
    62 on at

    hi @TerryS 

     

    You're for loop seems not as you want.

    Exceldata is a datable and your currentitem is a column , so iterate through each cell of your Currentitem and then use replace action 

    or else Do this:- 

    1)Search for each keyword in your text file, then

    2)check if it is available in Column A using for loop (iterating through each cell in the column)

    3)  if it is found, get the row no and then use your replace action and mention column B with row no.

     

    PAD does not have enough excel actions to work, but you can use 4 line VBA code to achieve this. 

     

    Thanks 

    AR

    Please consider marking my post as a solution! to guide others, if this helps.

     

     

     

  • ShanKM Profile Picture
    45 on at

    Hi @TerryS ,

     

    try in this way, this is the easiest method to implement. 

    text replacetext replace

     

    Thanks,

    Shan KM

  • Riyaz_riz11 Profile Picture
    4,219 Super User 2026 Season 2 on at

    Hi @TerryS 

     

    In for each u hav to mention just read excel output variable.

    i think u hav to mention currentitem in foreach loop

    currentitem[0] , currentitem[1]

    Thanks

    Ahammad Riyaz

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard