How to Replace SharePoint Text from Excel Mapping Table with Power Automate
Question details
The user needs to create a Power Automate flow that dynamically replaces text in a SharePoint list column based on an 'Old' and 'New' text mapping table stored in Excel.

- Product
- Excel, Power Automate, SharePoint
- Device & OS
- not provided
- Scenario
- Automating bulk text replacement in a SharePoint list using a growing Excel mapping table for consistent data updates.
- Observed behavior
- The user wants a scalable workflow that can loop through multiple SharePoint items and apply multiple sequential text replacements to a specific column using Excel data.
Ensure your Excel mapping data is formatted as an official Table (Insert > Table) with clear headers like 'Old' and 'New', and verify you have edit permissions for the target SharePoint list.
Create a Power Automate Flow with Nested Loops
Use a nested loop structure in Power Automate to iterate through SharePoint items and apply the Excel mapping text replacements sequentially.
To achieve multiple replacements on a single SharePoint item from an expanding Excel table, you must loop through the Excel rows for every single SharePoint item. This ensures that all mapping rules are evaluated against the current text.
Start your flow and add the 'List rows present in a table' action for your Excel file. Then, add the 'Get items' action to retrieve the target data from your SharePoint list.
Add an 'Apply to each' control (outer loop) and insert the 'value' dynamic content from the SharePoint 'Get items' action. This will iterate through every item in your list.
Inside the first loop, add a second 'Apply to each' control (inner loop). Insert the 'value' dynamic content from the Excel 'List rows present in a table' action.
Use a Compose action or update a String Variable inside the inner loop. Use the expression: replace(items('Apply_to_each_SharePoint')?['Remarks'], items('Apply_to_each_Excel')?['Old'], items('Apply_to_each_Excel')?['New']) to execute the text swap.
Outside the inner Excel loop but still inside the outer SharePoint loop, add an 'Update item' action. Pass the final replaced text string to the SharePoint 'Remarks' column to save the changes.

Manage Your Mapping Tables Efficiently with WPS Office
While Power Automate and SharePoint are Microsoft ecosystem tools, you can seamlessly create, edit, and manage your Excel mapping tables using WPS Office. It provides a lightweight, highly compatible alternative for handling spreadsheets without expensive subscriptions.
- 1. Download and Install: Download WPS Office for free and install it on your device.
- 2. Open Your Mapping Table: Open your .xlsx mapping file directly in WPS Spreadsheet.
- 3. Edit and Save: Add new 'Old' and 'New' replacement rules, save the file, and let Power Automate handle the rest.

Frequently Asked Questions
Why is my Power Automate flow timing out on large Excel mapping tables?
Nested loops process data sequentially, which is slow for large datasets. For large tables, consider turning on 'Concurrency Control' in the 'Apply to each' settings, or handle bulk replacements using an Office Script in Excel before importing to SharePoint.
How do I prevent errors if an Excel mapping row has blank values?
Add a 'Condition' action at the start of your inner loop to check if the 'Old' or 'New' value is empty using the empty() expression. If it is empty, leave the 'If yes' branch blank to skip the row and prevent replacement errors.
Can I use this nested loop method to replace text in multiple SharePoint columns at once?
Yes. You can create multiple string variables or Compose actions for different columns within the same inner loop, applying the replace() expression to each respective column. Then, map them all at once in the final 'Update item' action.




