Document Editing Problems

How to Merge Multiple Excel Rows into Separate Word Documents in WPS Office

Algirdas JasaitisAlgirdas Jasaitis Nov 13, 2026 869 views

Question details

The user needs to combine multiple Excel rows that share the same employee name or ID into one Word document per employee, rather than creating a separate document for each data row.

Product
WPS Office Writer and WPS Spreadsheets
Device & OS
not provided
Scenario
Creating employee letters, statements, or notices from a flat Excel table that contains repeated rows for each employee.
Observed behavior
A standard Word mail merge treats each Excel row as a separate record, so repeated employee rows do not automatically appear together in one employee document.
Before you start

Open the workbook in WPS Spreadsheets and confirm that the employee name or ID column is the common key, the first row contains field names, and all records are arranged in one flat table on the first worksheet.

Solution 1Recommended

Prepare one grouped row per employee in WPS Spreadsheets, then run WPS Writer Mail Merge

Use this solution when each employee document must contain several matching Excel rows. Grouping the repeated rows into one row per employee avoids unsupported many-to-one merge rules and gives WPS Writer a clean data source.

Standard mail merge treats every Excel row as an independent record, so repeated employee rows normally produce separate merged pages. By grouping matching rows in WPS Spreadsheets first, you create a single record for each employee while keeping all related details inside that employee's document.

1
Create a unique employee list

In WPS Spreadsheets, copy the employee name or ID column to a new sheet, select the column, click Data > Remove Duplicates to keep one unique row per employee.

2
Combine matching rows into one cell

Next to each unique name, use a formula such as =TEXTJOIN(CHAR(10),TRUE,IF(Source!$A$2:$A$100=A2,Source!$B$2:$B$100,"")) and confirm it as an array formula if WPS Spreadsheets requires it, or build the grouped detail columns manually.

3
Save the grouped worksheet as the first sheet

Click Save, keep the grouped summary as the first worksheet, and make sure it has a header row with the same field names you want to use in WPS Writer.

4
Start Mail Merge in WPS Writer

Open WPS Writer, click Mailings > Mail Merge, choose the saved workbook as the data source, then insert the grouped fields into the document.

5
Complete and export the merged documents

Finish the merge to a new WPS Writer document, then use File > Export to PDF or save the merged result as separate Word files for each employee.

One employee, one document: After grouping, the merged document contains all matching details for that employee in a single section instead of creating separate pages for each repeated Excel row.
WPS Office Mail Merge

Merge multiple Excel rows into separate Word documents with WPS Office

Use WPS Spreadsheets to group repeated employee rows, then run WPS Writer Mail Merge to create a separate Word or PDF document for each employee. WPS Office gives you the tools to complete the many-to-one merge without leaving the suite.

  1. 1. Open WPS Writer and start Mail Merge: In WPS Writer, click Mailings > Mail Merge to open the Mail Merge workflow.
  2. 2. Select the grouped Excel worksheet: Choose the saved WPS Spreadsheets workbook that contains one row per employee plus the combined detail column.
  3. 3. Insert merge fields and preview: Insert the employee name and grouped detail fields into the document, then preview the result for one employee.
  4. 4. Finish and export: Complete the merge to a new document and use File > Export to PDF or save each employee document as a Word file.
Combines repeated Excel rows into one document per employee instead of creating one page per data row.Opens and saves .xlsx and .docx files with Microsoft Office format compatibility.Free, lightweight WPS Office suite with a familiar Writer and Spreadsheets interface.Lets you export merged results as Word or PDF files directly from WPS Writer.
microsoft office alternative - wps office

Frequently Asked Questions

Can WPS Writer Mail Merge use an Excel worksheet with multiple rows per employee?

Yes, WPS Writer Mail Merge can connect to an Excel data source. However, to place multiple matching rows into one employee document, prepare a grouped worksheet in WPS Spreadsheets so each employee has one row containing the combined details.

How should I name the columns in the Excel mail merge data source?

Put field names in the first row of the worksheet, use alphanumeric characters, do not start with a number, and keep each name under 40 characters.

How do I export the merged employee documents as PDF?

After finishing the mail merge in WPS Writer, click File > Export to PDF and choose the save location. You can also save the merged result as Word documents if you need to edit them further.

Why does each Excel row still create a separate page instead of grouping by employee?

This happens when the data source still has repeated rows and the merge is using one record per row. In WPS Spreadsheets, build a grouped sheet with one unique employee per row and use that grouped sheet as the WPS Writer data source.

Does WPS Office keep .xlsx and .docx formatting when I reopen files from Microsoft Office?

Yes, WPS Office opens, edits, and saves .xlsx and .docx files with Microsoft Office format compatibility, so your Excel data and Word documents remain usable across both suites.