Power Query Problems

Clean and Standardize Identifier Text in WPS Spreadsheets with Power Query

Huda QurayshiHuda Qurayshi Nov 13, 2026 869 views

Question details

The user needs to process about 58,000 text records, remove nonnumeric characters, add leading zeros to identifiers, and combine them into fixed-length values based on multiple record patterns.

Clean and Standardize Identifier Text in WPS Spreadsheets with Power Query
Product
WPS Spreadsheets with Power Query / Get & Transform
Device & OS
not provided
Scenario
Import a large text file, filter relevant record types, parse text between braces, clean and pad identifiers, and combine the results into fixed-length strings.
Observed behavior
Raw identifiers contain nonnumeric characters and inconsistent lengths that need to be standardized before they can be combined.
Before you start

Confirm that your source text file uses consistent record formatting and identify the exact record prefix to filter, such as #TRANS. Power Query is case-sensitive, so verify whether values like #TRANS and #Trans should be treated separately.

Solution 1Recommended

Use Power Query to Parse, Clean, Pad, and Combine Identifier Values

Use this solution to process the entire text file in one repeatable query without manually editing thousands of rows.

Power Query is well suited for large text files because the steps are recorded once and can be refreshed when new records are added.

The results depend on consistent input formatting, so check the parsed values against real records before applying the query to the full dataset.

1
Open the Power Query Editor

In WPS Spreadsheets, go to Data > Get Data > From Text/CSV and select the text file. Click Transform Data to open Power Query Editor.

2
Filter only the relevant record types

Select the column that contains the record text. Go to Home > Keep Rows > Keep Rows, choose Begins With, and enter the exact pattern such as #TRANS.

3
Extract the text between braces

Use Add Column > Extract > Text Between Delimiters. Set the start delimiter to { and the end delimiter to } to isolate the identifier block.

4
Remove nonnumeric characters

On the Add Column tab, click Custom Column and enter a formula such as Text.Select([IdentifierColumn], {"0".."9"}) to keep only digits.

5
Add leading zeros and combine identifiers

Create another Custom Column using Text.PadStart([CleanedColumn], 8, "0") to standardize length, or use Text.Combine to join the cleaned identifier parts into one fixed-length value.

6
Load the transformed table into the worksheet

Click Home > Close & Load. Review the output table against the source records and refresh after adding more data.

Use Power Query to Parse, Clean, Pad, and Combine Identifier Values
Verify patterns on real records: Power Query is case-sensitive, so #TRANS and #Trans are different values. Confirm the filter and output match your expected identifiers before expanding the dataset.
Direct solution in WPS Spreadsheets

Standardize Large Identifier Datasets with WPS Spreadsheets Power Query

WPS Spreadsheets provides Power Query / Get & Transform tools that let you clean, pad, and combine thousands of identifier records in a repeatable workflow instead of editing cells manually.

  1. 1. Open WPS Spreadsheets: Launch WPS Spreadsheets and open a blank workbook or your existing data workbook.
  2. 2. Import the text file into Power Query: Click Data > Get Data > From Text/CSV and choose the file that contains the 58,000 records.
  3. 3. Apply cleaning and padding formulas: In Power Query Editor, use custom columns with Text.Select to remove nonnumeric characters and Text.PadStart to add leading zeros.
  4. 4. Filter and combine the identifiers: Filter the relevant rows by the exact record pattern, then concatenate the cleaned values into the required fixed-length string.
  5. 5. Load the cleaned result: Click Close & Load to output the transformed dataset into WPS Spreadsheets.
Clean and standardize large text files without manual formula fills across every rowBuild reusable Power Query steps that refresh when source records changeOpen, transform, and save Microsoft Excel-compatible .xlsx files without losing the workbook formatFree, lightweight Office suite with a familiar ribbon interface and smooth migration from Excel
microsoft office alternative - wps office

Frequently Asked Questions

Does WPS Office include Power Query?

Yes. WPS Spreadsheets includes Power Query / Get & Transform tools under the Data tab so you can import and transform large text or CSV files without manual editing.

How do I remove nonnumeric characters from a column in Power Query?

In Power Query Editor, select the column, go to Add Column > Custom Column, and enter a formula such as Text.Select([Column], {"0".."9"}).

How do I add leading zeros to make identifiers a fixed length?

Use a custom column with Text.PadStart([Column], 8, "0"), replacing 8 with the required total length for your identifier.

Why are #TRANS and #Trans treated as different values?

Power Query text filters and comparisons are case-sensitive, so values with different capitalization are treated as separate records.

How do I refresh the cleaned output after adding more source records?

Save the updated source file, return to the WPS Spreadsheets workbook, right-click the output table, and select Refresh.