Power Query Problems

How to Combine Split TXT Messages and Import New Files in WPS Power Query

John WilsonJohn Wilson Nov 13, 2026 869 views

Question details

The user needs to import TXT conversation logs from a folder into WPS Power Query, combine messages that continue across multiple lines into single rows, keep existing records when new files are added, and correct date interpretation by choosing the appropriate regional locale.

How to Combine Split TXT Messages and Import New Files in WPS Power Query
Product
WPS Office Spreadsheets - Power Query
Device & OS
not provided
Scenario
Importing and transforming multi-file TXT conversation logs for reporting or analysis in WPS Office.
Observed behavior
Messages appear as separate continuation rows, dates may be interpreted using the wrong locale, and the user wants new source files appended without deleting existing query results.
Before you start

Place all relevant TXT files in one source folder and confirm whether message-start rows can be identified by a consistent prefix, timestamp, or delimiter. Also check whether the source dates use US or UK format before applying a Changed Type step.

Solution 1Recommended

Connect to a source folder so new TXT files are appended while previous data remains

Use this when you need a repeatable import that includes newly added TXT files and preserves records already loaded from earlier files.

A folder data source makes Power Query read all files currently in the folder. When you refresh after adding new files, the query includes them and the existing output is not deleted by the refresh operation.

1
Open the folder data source

In WPS Spreadsheets, go to the Data tab and select Get Data > From File > From Folder.

2
Select the TXT folder

Browse to the folder that contains the TXT conversation files, select the folder, and confirm.

3
Combine or expand the file contents

In the preview dialog, choose Combine Files if the TXT files share the same structure, or expand the Content column and apply the TXT import steps to the sample file.

4
Load the query

Rename the query and use Close & Load to send the result to a worksheet or connection.

Connect to a source folder so new TXT files are appended while previous data remains
Refresh appends new files: Refreshing the folder query re-reads the folder and includes new TXT files; previously loaded rows remain unless a source file is removed or a filter removes them.

Import and Merge Split TXT Conversation Logs in WPS Office Power Query

In WPS Office Spreadsheets, use Power Query to connect to a folder, transform TXT conversation logs, merge continuation lines into the correct message row, and set the correct date locale. Because the query reads from the folder, refreshed imports include new files while keeping all previously loaded records.

  1. 1. Open WPS Spreadsheets: Launch WPS Office and open a blank spreadsheet, then go to the Data tab and access Get Data > From File > From Folder.
  2. 2. Connect to the TXT folder: Select the folder containing the TXT conversation files and choose Combine Files or expand the Content column to apply the import transformation.
  3. 3. Transform split messages: In the Power Query Editor, mark message-start rows, fill down the message ID, group by that ID, and combine the continuation text into one message column.
  4. 4. Set the date locale and load: In the Changed Type step, set the regional locale such as English (United Kingdom), then Close & Load the query to a worksheet.
  5. 5. Refresh when files are added: After adding new TXT files to the folder, right-click the loaded query and select Refresh to append them without removing existing records.
Automatically includes new TXT files from the source folder on refresh without deleting existing records.Merge multiline conversation messages into a clean table using Power Query transformations.Fix date misreads by applying the correct regional locale in the Changed Type step.Fully compatible with Microsoft Excel XLSX, CSV, and TXT data formats.
QA img-9

Frequently Asked Questions

Why does refreshing my folder query not remove old records?

A From Folder connection treats the folder as the data source. Refresh re-reads all current files and appends new rows; existing rows remain unless source files are deleted or filters remove them.

How do I stop continuation lines from becoming separate rows?

In the Power Query Editor, add an index column, create a conditional group ID based on the message-start pattern, fill the ID down, and then use Group By with Text.Combine to merge continuation lines into the preceding message.

Why are my dates imported as text or wrong values?

The Changed Type step likely uses the wrong locale. Select the date column, choose Change Type > Using Locale, and set the locale to English (United Kingdom) or the locale that matches your source TXT date format.

Can I import all TXT files from a folder at once?

Yes, in WPS Spreadsheets go to Data > Get Data > From File > From Folder, then choose Combine Files or expand the Content column to import all TXT files. New files are included when you refresh the query.