Power Query Problems

Refresh RPT or TXT Data in Excel with Power Query

Rana GarciaRana Garcia Dec 2, 2026 868 views

Question details

Connect an Excel workbook to an RPT or TXT file, transform the order data, and refresh it when a new file arrives.

How to Refresh RPT or TXT Data in Excel with Power Query
Product
Microsoft Excel Power Query
Device & OS
not provided
Scenario
A user receives recurring order data files and wants to reuse the same cleanup steps in an Excel workbook.
Observed behavior
The workbook should load the cleaned data and update it from a replacement source file when the query is refreshed.
Before you start

Open the RPT or TXT file in a text editor to confirm that it contains readable, consistently structured text. Note its folder, file name, delimiter, and header layout so you can configure the import and replace the source consistently.

Solution 1Recommended

Connect the text file to Excel Power Query and refresh it

Use this method to apply cleanup steps once and rerun them whenever a replacement file arrives.

1
Connect to the source file

In Excel, select Data > Get Data > From File > From Text/CSV, then browse to the RPT or TXT file. If the file picker does not show the RPT file, select All Files if available, or use a text copy with a .txt extension.

2
Preview and transform the data

Check the preview and select the appropriate delimiter if needed, then select Transform Data. In Power Query Editor, use the available commands to remove unwanted rows, split columns, promote headers, and set data types as needed.

3
Load and save

Select Home > Close & Load to place the results in Excel, then select File > Save to save the workbook and its query.

4
Replace the source and refresh

When the next file arrives, place it at the same path and use the same file name as the connected source. Open the workbook and select Data > Refresh All to rerun the query.

Connect the text file to Excel Power Query and refresh it
Keep the file structure consistent: Refresh works best when the replacement file has the same delimiter, columns, and header layout. If its structure changes, open Data > Queries & Connections and edit the query to adjust the transformation steps.
Free Microsoft Office alternative

Review Order Data with WPS Spreadsheets

WPS Office is a free, lightweight Office alternative with a familiar interface and Microsoft Excel format compatibility, making it easy to move everyday spreadsheet work to WPS. It does not fix Excel Power Query refresh issues, and existing queries may not work the same way in WPS.

Review and organize order data in WPS SpreadsheetsOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interfaceMove everyday spreadsheet work to a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Can Power Query import every RPT file?

No. This method is for RPT files that contain structured, readable text. Open the file in a text editor first; a binary or proprietary report format may need to be exported as TXT or CSV by its source application.

What if Excel cannot find the replacement file?

Check that the replacement has the same file name and is in the same folder as the original source. If the path has changed, use Data > Get Data > Data Source Settings to update it, or edit the source step in Power Query.

Will my cleanup steps run again when I refresh?

Yes. Power Query reruns the saved transformation steps when you select Data > Refresh All. If the new file has a different layout, some steps may need to be edited.

What should I do if the imported columns are incorrect?

Open the query from Data > Queries & Connections and check the delimiter, header, and split-column steps in Power Query Editor. Adjust them to match the source file, then select Close & Load.