logo
search
Others

How to Replace SharePoint Text from Excel Mapping Table with Power Automate

Tauseeq MagsiTauseeq Magsi Oct 1, 2026 868 views

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.

Replace SharePoint Text from an Excel Mapping Table using Power Automate
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.
Before you start

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.

Solution 1Recommended

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.

1
Retrieve Excel and SharePoint Data

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.

2
Set up the First Loop (SharePoint Items)

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.

3
Set up the Second Loop (Excel Mapping)

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.

4
Apply the Replacement Expression

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.

5
Update the SharePoint Item

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.

Create a Power Automate Flow with Nested Loops
Handle Overlapping Values Carefully: Be cautious with mapping rules that overlap (e.g., replacing 'cat' with 'dog', and then 'dog' with 'wolf'). Because the loops run sequentially, you may get unexpected final results like 'wolf' instead of 'dog'.
Free Microsoft Office alternative

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. 1. Download and Install: Download WPS Office for free and install it on your device.
  2. 2. Open Your Mapping Table: Open your .xlsx mapping file directly in WPS Spreadsheet.
  3. 3. Edit and Save: Add new 'Old' and 'New' replacement rules, save the file, and let Power Automate handle the rest.
100% compatible with Microsoft Excel (.xlsx) formatsLightweight application that opens large mapping tables instantlyFree to use with a familiar, easy-to-learn tabbed interfaceBuilt-in data validation tools to ensure clean 'Old' and 'New' mapping data
microsoft office alternative - wps office

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.