Refresh RPT or TXT Data in Excel with Power Query
Question details
Connect an Excel workbook to an RPT or TXT file, transform the order data, and refresh it when a new file arrives.

- 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.
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.
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.
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.
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.
Select Home > Close & Load to place the results in Excel, then select File > Save to save the workbook and its query.
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.

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.

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.




