Function Problems

WPS Spreadsheet: Automatically Generate a Production List from Excel Table Values

Steven ParkerSteven Parker Nov 12, 2026 868 views

Question details

The user needs to expand product data from an Excel-compatible table into a printable production list, repeating each product according to its quantity.

Product
WPS Spreadsheet
Device & OS
not provided
Scenario
Product lengths, grades, and quantities are stored in a source table, and the user wants an automatically refreshed production list.
Observed behavior
A production-list output has not yet been generated from the source table values.
Before you start

Create a normalized source table with one product per row and the columns Product, Length, Grade, and Quantity. Confirm that every Quantity value is a nonnegative number, then name the table ProductionTable from the Table tools or Name Manager.

Solution 1Recommended

Generate the repeated production list with a dynamic-array formula

Use this method when your WPS Spreadsheet version supports LET, FILTER, SCAN, SEQUENCE, XMATCH, INDEX, and HSTACK; the output updates when the source table changes.

The formula calculates cumulative quantity totals, creates one position for every production unit, and maps each position back to the corresponding product row. Place the formula in the top-left cell of an empty output area so the results can spill automatically.

If your version does not support one of these dynamic-array functions, use a helper-column design or a macro-enabled workflow instead of replacing the source table with manually duplicated rows.

1
Prepare the source table

In WPS Spreadsheet, select the source range and choose Insert > Table. Set the table name to ProductionTable and use the headers Product, Length, Grade, and Quantity.

2
Enter the expansion formula

On a new worksheet, select cell A2 and enter =LET(data,FILTER(ProductionTable[[Product]:[Quantity]],ProductionTable[Quantity]>0),product,CHOOSECOLS(data,1),length,CHOOSECOLS(data,2),grade,CHOOSECOLS(data,3),qty,CHOOSECOLS(data,4),pos,SEQUENCE(SUM(qty)),ends,SCAN(0,qty,LAMBDA(a,v,a+v)),idx,XMATCH(pos,ends,1),HSTACK(INDEX(product,idx),INDEX(length,idx),INDEX(grade,idx))). Press Enter to spill the generated list.

3
Add output headings

In cells A1:C1, enter Product, Length, and Grade. If each production unit needs a sequence number, enter Unit No. in A1 and place =SEQUENCE(SUM(ProductionTable[Quantity])) in A2, then place the three-column formula in B2.

4
Format and print the list

Select the spilled output range, use Home > Borders and the Number Format controls to make it readable, then choose Page Layout > Print Area > Set Print Area before selecting File > Print.

Function availability: FILTER, SCAN, SEQUENCE, XMATCH, LET, CHOOSECOLS, and HSTACK may vary by WPS version. If the formula returns a function-name error, use a compatible WPS version or create the repeated rows with helper columns or VBA.

Build a Refreshable Production List in WPS Spreadsheet

WPS Spreadsheet can use an Excel-compatible table and dynamic-array formulas to repeat each product according to its quantity, preserve length and grade values, and produce a formatted list ready for printing.

  1. 1. Create the source table: Open WPS Spreadsheet, choose Insert > Table, and define the Product, Length, Grade, and Quantity columns.
  2. 2. Name the table: Use the Table tools or Formulas > Name Manager to name the table ProductionTable.
  3. 3. Insert the formula: Select an empty output cell and enter the LET, FILTER, SCAN, SEQUENCE, XMATCH, INDEX, and HSTACK formula to expand the quantities into individual production rows.
  4. 4. Format the output: Add headings, apply borders and number formats from the Home tab, and check the spilled rows for missing or invalid quantities.
  5. 5. Print the list: Use Page Layout > Print Area > Set Print Area, then select File > Print to produce the final production list.
Automatically expands each product by its Quantity value and refreshes when source data changesKeeps Product, Length, and Grade together in a structured output listSupports familiar Excel-compatible table formulas and spreadsheet workflowsOpens and saves Microsoft Excel .xlsx and macro-enabled .xlsm files for easier migration
microsoft office alternative - wps office

Frequently Asked Questions

What columns are required to generate the production list?

Use one row per product with Product, Length, Grade, and Quantity columns. The formula filters out rows with zero or blank quantities and repeats the remaining products according to Quantity.

Why does the dynamic-array formula return a function error?

Your WPS Spreadsheet version may not support one of the newer functions, such as SCAN, XMATCH, HSTACK, or CHOOSECOLS. Update WPS Office or use a helper-column or macro-based method for older versions.

How do I prevent incorrect output when quantities are entered as text?

Select the Quantity column and choose Home > Number Format > Number. Replace text values with numeric values, remove extra spaces, and confirm that quantities are zero or greater.

Can the generated production list be printed as a numbered list?

Yes. Add a Unit No. heading and enter =SEQUENCE(SUM(ProductionTable[Quantity])) in the first output cell. Format the results through Home > Number Format and set the print area from Page Layout.

Will the list update after I add a new product row?

Yes, provided the new row is inside the named ProductionTable and its Quantity is numeric. The spilled formula recalculates when the table values change.