How to Merge Duplicate Grocery Order Rows for a Word Mail Merge in WPS Office
Question details
The user needs to consolidate grocery order data where one OrderID spans multiple rows and product details are split across CoreProduct, AddOnProducts, and BoxContents into a customer-friendly packing list for mail merge.
- Product
- WPS Office Writer and WPS Spreadsheets
- Device & OS
- not provided
- Scenario
- A user is preparing a grocery packing list from order data where each order occupies multiple rows with the same OrderID and product details are spread across CoreProduct, AddOnProducts, and BoxContents.
- Observed behavior
- The same OrderID appears in multiple rows, and the product fields may contain comma-separated lists, so a standard mail merge repeats the order heading for every row instead of grouping all items under one order.
Check that each order row contains an OrderID and that CoreProduct, AddOnProducts, and BoxContents are consistently separated by commas or another delimiter. Open the source file in WPS Spreadsheets first so you can clean and preview the data before starting the mail merge.
Consolidate Duplicate OrderID Rows in WPS Spreadsheets and Merge in WPS Writer
Use this when you want one packing list per order in a standard mail merge; it groups products under a single OrderID before running the merge.
A standard Word or WPS Writer mail merge creates one output document per source row. If the same OrderID appears in several rows, first consolidate those rows so the mail merge does not repeat the order heading for every product line.
Open your grocery order workbook in WPS Spreadsheets. Select the data range including the OrderID, CoreProduct, AddOnProducts, and BoxContents columns.
Select the product columns, click Data > Text to Columns, choose Delimited, check Comma, and finish to expand each product item into its own column.
Insert a helper column, then use Data > PivotTable or formulas such as TEXTJOIN/IF to combine all product items for the same OrderID into a single cell separated by line breaks.
Open WPS Writer, click Mailings > Mail Merge > Mail Merge Wizard, and select the document type that matches the packing list, such as Letter for one page per order or Directory/Catalog if available. Select the consolidated WPS Spreadsheets file as the data source.
Insert the OrderID and combined packing list merge fields, preview the result, then click Finish & Merge to print or save individual packing lists.

Split Product Fields into Separate Columns for a Wide Mail Merge Layout
Use this if the customer wants each product category in its own column instead of a combined packing list.
Create a Grouped Packing List Report with a PivotTable in WPS Spreadsheets
Use this when you do not need a Word document and prefer a printable report generated directly from the data.
Build a Customer-Friendly Grocery Packing List with WPS Office Mail Merge
Use WPS Spreadsheets to clean and consolidate the duplicate order rows, then run a WPS Writer mail merge to produce one clear packing list per OrderID without a separate Word add-in.
- 1. Open the source workbook: Start WPS Office, open the grocery order workbook in WPS Spreadsheets, and confirm the OrderID column is present.
- 2. Clean and consolidate the data: Use Data > Text to Columns to split product fields, then combine or pivot the data to one row per OrderID.
- 3. Start the WPS Writer mail merge: Open WPS Writer and go to Mailings > Mail Merge > Mail Merge Wizard, select the document type, and choose the cleaned spreadsheet as the recipient list.
- 4. Insert packing list fields: Insert the OrderID and combined product fields, preview the merged document, and adjust spacing or line breaks.
- 5. Finish and save: Click Finish & Merge to create the final packing lists, then save or print them.

Frequently Asked Questions
Why does a standard Word mail merge repeat the grocery order heading for each duplicate row?
Mail merge normally creates one output document per data row. When the same OrderID appears in multiple rows, each row produces a separate heading. Consolidate the rows in WPS Spreadsheets or use a directory/catalog merge so all product lines sit under one OrderID.
Can WPS Office create a many-to-one mail merge without Graham Mayor's add-in?
Yes. You can prepare one row per OrderID in WPS Spreadsheets and then use WPS Writer's Mailings > Mail Merge wizard. If you keep multiple rows, choose a directory/catalog document type to list product lines together.
How do I split CoreProduct, AddOnProducts, and BoxContents when they contain comma-separated lists?
In WPS Spreadsheets, select the columns, click Data > Text to Columns > Delimited, check Comma, and choose where to place the split columns before running the merge.
What is the easiest way to group duplicate OrderID rows in WPS Spreadsheets?
Use Insert > PivotTable and drag OrderID into the Rows area, then place the product fields in the Rows or Values area. Alternatively, use helper formulas like TEXTJOIN/IF to combine product lines into one cell per OrderID.
Can I create a printable packing list without using Word mail merge?
Yes. In WPS Spreadsheets, create a PivotTable with OrderID in Rows and product fields in Rows/Values, then set Report Layout > Show in Outline Form and print the sheet.




