How to Fix Power Query Not Loading New CSV Columns
Question details
Users are unable to load newly added columns from updated CSV files using Power Query.

- Product
- Power Query
- Device & OS
- not provided
- Scenario
- Updating a data source where new columns have been added to the underlying CSV files, but the query results do not display them.
- Observed behavior
- Power Query ignores the newly added columns because the generated Csv.Document step has hardcoded the original number of columns based on an older sample file.
Before modifying the M code in your query, ensure you have duplicated the original query or saved a backup copy of your workbook.
Remove the Fixed Columns Parameter in Advanced Editor
Manually delete the hardcoded column count in the Csv.Document function so Power Query automatically detects all available columns during refresh.
When importing CSV files, Power Query generates a sample based on the initial file. It automatically inserts a specific column count to optimize performance. Removing this fixed value forces Power Query to dynamically read the actual structure of the file.
In the Power Query Editor, locate the 'Transform File' query or the specific query handling your CSV data. Go to the Home tab on the ribbon and click on 'Advanced Editor'.
Find the line of code containing the Csv.Document function. It will look similar to: Csv.Document(Parameter2,[Delimiter=",", Encoding=1252, Columns=35, QuoteStyle=QuoteStyle.None]).
Carefully remove the 'Columns=X,' portion from the bracketed arguments. The updated line should look like: Csv.Document(Parameter2,[Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.None]).
Click 'Done' to close the Advanced Editor, then click 'Close & Load' from the Home tab to apply the changes and refresh your data set with the new columns included.

Try WPS Office for Seamless Data Management
If you frequently work with CSV files and need a fast, reliable spreadsheet tool without dealing with complex Power Query M code, WPS Office provides an intuitive, lightweight, and highly compatible alternative.
- 1. Download and Install WPS Office: Visit the official WPS website, download the free installer, and complete the lightweight setup process.
- 2. Open Your Data: Launch WPS Spreadsheet and go to 'Data' > 'Import Data' to effortlessly load and manage your CSV files without complex coding.

Frequently Asked Questions
Why does Power Query hardcode the number of columns for CSV files?
When you initially import a CSV or folder of CSVs, Power Query generates a sample based on the first file it reads. It automatically inserts the Columns parameter to define the structure and optimize performance based on that initial sample.
Will removing the Columns parameter slow down my data refresh?
It may slightly increase the processing time during refresh because Power Query has to count the columns dynamically each time instead of relying on a fixed number, but this difference is usually negligible and necessary for capturing dynamic data.
How do I ensure the new CSV columns have the correct data types?
After removing the fixed column count, you may need to check the 'Changed Type' step in your query. If the newly added columns aren't automatically typed, you can select them and manually assign the correct data type (like Text, Number, or Date) in the Home tab.




