Do not deduplicate a recurring web-to-Excel flow by comparing every cell. Pick a stable record key, look for that key in the workbook, and append only rows that are not already there. In Power Automate Desktop, the practical pattern is: extract the web table, read the existing worksheet into a second data table, filter by the record ID, then append the rows whose match count is zero.
The sample below uses fictional product data. It is a build checklist, not a claim that this exact flow was run on a Windows machine.
Choose the duplicate key before building the flow
A product name is a poor key. It can be edited. Price is worse because it is expected to change. Use a source ID or a stable detail-page URL when the site provides one.
| RecordId | Name | Price |
|---|---|---|
| SKU-1042 | USB Hub | 32.90 |
| SKU-1088 | Desk Lamp | 41.50 |
If the workbook already contains SKU-1042, the next run should add only SKU-1088. If the price for SKU-1042 changed, that is not a harmless duplicate. Route it to an update or review path.
The flow in seven steps
- Extract the web table into a data table named
WebRows. - Read the current Excel data into
ExistingRows. - Create an empty data table named
RowsToAppendwith the same columns. - Loop through
WebRowsand filterExistingRowsbyRecordId. - When the filtered result has zero rows, add the current row to both
RowsToAppendandExistingRows. - Append
RowsToAppendto the worksheet in one block. - Log extracted, new, skipped, invalid, and changed row counts.
Extract the web table as a data table
Use Extract data from web page and store the result in WebRows. Microsoft documents that structured web data can be captured as values, lists, or tables. For a repeating flow, inspect the output before touching Excel.
Stop on an empty key
Check three things immediately:
RecordIdexists and is not blank.- The header row was not imported as a data row.
- The ID column uses one consistent type.
Send a blank ID to an invalid-row list. Do not invent a fallback key from the name and price just to keep the run green.
Read the existing workbook before appending
Open the workbook with Launch Excel, then use Read from Excel worksheet to load the existing range into ExistingRows. Keep the column order consistent: RecordId, Name, Price.
Treat identifiers as text when leading zeros matter. A web value such as 001042 should not be compared with an Excel value that was silently converted to the number 1042.
Filter by RecordId inside the loop
For each row in WebRows, configure Filter data table like this:
- Data table:
ExistingRows - Column:
RecordId - Operator: Equal to
- Value: the current row’s
RecordId - Output:
MatchedRows
When MatchedRows.RowsCount = 0, insert the current row at the end of RowsToAppend.
Also add the new row to ExistingRows
This small step prevents duplicates within the same scrape. Suppose SKU-1088 appears twice in WebRows. If the first copy is added only to RowsToAppend, the second copy still looks new when the flow checks the original workbook data. Updating ExistingRows after each accepted key closes that gap.
Append the accepted rows to Excel
Run Append cells in Excel worksheet only when RowsToAppend.RowsCount > 0. Set the first-row-has-headers option to match the destination and choose the starting column. Microsoft describes this action as appending a range at the destination’s first empty row.
If that action is not available in the installed version, use Get first free row on column and pass its result to Write to Excel worksheet. Pick one method; using both makes the target row harder to reason about.
Why Delete duplicate rows is not enough
Delete duplicate rows from data table removes rows when their cell values are duplicates. It does not decide what a business key means.
| RecordId | Name | Price |
|---|---|---|
| SKU-1042 | USB Hub | 32.90 |
| SKU-1042 | USB Hub | 34.90 |
Those rows share an ID but are not identical. Decide whether a changed price should update the current row or create a history record. This sample flags it for review instead of appending it automatically.
Test with two rows, then run it twice
Start with one existing workbook row, SKU-1042. Feed the flow two web rows: SKU-1042 and SKU-1088.
- Extracted: 2
- Appended: 1 (
SKU-1088) - Skipped existing key: 1 (
SKU-1042) - Invalid key: 0
- Final workbook rows: 2
Run the same input again. The second run should append zero rows. If it adds more, check whether the accepted key was copied into ExistingRows and whether whitespace, case, or data types changed between the two sources.
Log the result you will need after a failed run
Record at least five counts: extracted, appended, skipped, blank-key, and changed-existing. Treat an empty extraction, a blank key, or a failed Excel save as a review condition. Do not mark an input batch complete until the workbook save succeeds.
File paths, locks, Excel installation, and Office configuration can all cause Excel actions to fail. Keep the source data untouched until the saved workbook and row counts have been checked.
Where this fits with multi-file consolidation
This flow prevents repeated web records from being appended. If the input is a folder of workbooks rather than a web table, use the separate guide to merge Excel files with Power Automate Desktop, then apply a key policy to the combined rows.
Official sources
- Microsoft Learn: Automate webpages
- Microsoft Learn: Excel actions reference
- Microsoft Learn: Variables actions reference
- Microsoft Learn: Troubleshoot Excel action errors
Sources checked October 30, 2026. Action names and screens can vary by installed version. The sample uses fictional data and was not executed in Power Automate Desktop on Windows.