logo
search
Data Import & Export

How to Merge Repeated Values in Excel Data from Logic Apps

Guest WriterGuest Writer Oct 1, 2026 869 views

Question details

The user needs to prevent Azure Logic Apps from writing duplicate project names and managers to every Excel row, and instead group or merge these shared values.

How to Merge Repeated Values in Excel Data from Logic Apps
Product
Microsoft Excel
Device & OS
not provided
Scenario
Exporting structured, grouped data from Azure Logic Apps to an Excel spreadsheet without repeating parent data.
Observed behavior
Logic Apps writes repeating project details to every single row, causing duplicate values and an unorganized layout rather than grouping related records.
Before you start

Before modifying your workflow, prepare a sample of your current input data and sketch out the exact expected Excel output to help define your grouping logic.

Solution 1Recommended

Use Grouping and Conditional Workflows in Logic Apps

Adjust your Logic Apps workflow to identify shared values and write them only once per group, leaving related cells blank for subsequent rows.

To prevent Logic Apps from duplicating data across every row, structure your workflow to recognize parent-child relationships in your data. By defining the grouped output beforehand, you can write the project details during the first iteration and output blank values for subsequent related records.

1
Identify Grouping Columns

Determine which columns in your data payload dictate a unique project group, such as the 'Project Name' or 'Manager' fields.

2
Initialize a Tracking Variable

Create a variable at the beginning of your Logic Apps workflow to track the 'Current Project Name' as the loop progresses.

3
Add a Condition Statement

Inside your 'For each' loop, add a Condition shape to check if the incoming project name matches your tracking variable.

4
Map Outputs to the Excel Connector

Configure the 'Add a row into a table' Excel action. If the condition is false (indicating a new project), map the project name into the row and update the variable. If true, pass a null or blank value for the project name field.

Sample Data Required: You will need a sample of your JSON input and the expected Excel table layout to write the exact expression for your specific array grouping.
Advanced Data Management

How to Clean Up Exported Data in WPS Spreadsheet

If your Logic Apps export already contains duplicate data, you can quickly group or merge these repeated values manually using WPS Spreadsheet's built-in data tools.

  1. 1. Open the Exported File: Launch WPS Spreadsheet and open the .xlsx file generated by your Logic Apps workflow.
  2. 2. Select the Target Data Range: Highlight the columns that contain the repeated project names and managers.
  3. 3. Remove Duplicate Rows: Navigate to the Data tab on the top ribbon and click on 'Remove Duplicates' to instantly clean the dataset.
  4. 4. Consolidate with a Pivot Table: Alternatively, go to Insert > Pivot Table to group your raw data by project name, creating a clean, consolidated report.
Instantly identify and remove duplicate values in your exported datasets.Use Pivot Tables to automatically group repeated project names and managers.Fully compatible with all .xlsx and .csv files generated by automation tools.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Logic Apps write duplicate rows in Excel?

Logic Apps processes array data row by row. If you are looping through an array that contains repeating parent details alongside unique child details, the workflow will write the parent details on every single row unless explicitly told to group them conditionally.

Can I merge cells dynamically using Logic Apps?

Logic Apps does not have native actions to format or merge Excel cells dynamically. To simulate a merged appearance, you must structure your data payload to write the value in the first row and leave the field empty (null) for the subsequent related rows.

How do I remove duplicates in an already exported Excel file?

Open your spreadsheet, select the data range, navigate to the Data tab, and click 'Remove Duplicates'. Select the specific columns that define your unique records to strip out the unwanted repeated entries.