How to Combine Split TXT Messages and Import New Files in WPS Power Query
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.

- 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.
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.
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.
In WPS Spreadsheets, go to the Data tab and select Get Data > From File > From Folder.
Browse to the folder that contains the TXT conversation files, select the folder, and confirm.
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.
Rename the query and use Close & Load to send the result to a worksheet or connection.

Merge continuation lines into the correct message row in Power Query
Use this when a conversation message is split across multiple TXT lines and you need one clean row per message.
Fix misinterpreted dates by selecting the correct locale in the Changed Type step
Use this when TXT dates are converted incorrectly or become errors because the source date format is not US M/d/yyyy.
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. 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. 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. 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. 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. 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.

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.




