logo
search
Power Query Problems

Fix Power Query Returning Null Values After Excel Header Formatting Changes

John WilsonJohn Wilson Oct 7, 2026 869 views

Question details

The user is experiencing an issue where Power Query returns null values for the first row of data when combining monthly Excel files from a folder. This issue coincided with adding gray fill and top vertical alignment to the header rows.

Fix Power Query Returning Null Values After Excel Header Formatting Changes
Product
Microsoft Excel
Device & OS
not provided
Scenario
Combining multiple monthly Excel source files from a folder using Power Query without named tables.
Observed behavior
Values in the first row are transformed into nulls in the query output after cosmetic formatting was applied to the source files' headers.
Before you start

Before troubleshooting your query, ensure that all source Excel files in the target folder are closed, as open files can sometimes cause read errors or incomplete data extraction in Power Query.

Solution 1Recommended

Verify Source Data Consistency and Layout

Since cosmetic formatting like cell fill and alignment does not affect Power Query, the issue is likely due to structural changes, inconsistent headers, or shifted rows in the source files.

Power Query extracts raw data and structural elements, ignoring visual formatting such as background colors or font styles. When nulls appear after a formatting change, it usually implies that the data layout was inadvertently altered during the formatting process.

1
Check Starting Rows

Open an affected source file and verify if the data still starts on the exact same row and column as the older, working files. Extraneous blank rows added at the top can misalign the query.

2
Inspect Header Names

Ensure the column headers exactly match the expected names in your query. Look out for trailing spaces, line breaks (Alt+Enter), or capitalization changes that might have been introduced.

3
Review Data Types in Power Query

Open the Power Query Editor, look at the 'Changed Type' step, and check if the first row contains text in a column that Power Query has automatically typed as numerical.

4
Refresh and Isolate

In the Power Query Editor, filter the source folder to only load one of the problematic files. Walk through the 'Applied Steps' on the right panel one by one to see exactly which step introduces the null values.

Verify Source Data Consistency and Layout
Formatting Limitations: Power Query reads raw values and ignores all cell formatting (e.g., fill color, bold text, vertical alignment). Any errors are strictly related to the data structure, types, or naming conventions.
Free Microsoft Office alternative

Experience Seamless Data Management with WPS Office

If you are tired of complex data query errors and rigid formatting rules, try WPS Office. It provides a lightweight, fast, and highly compatible spreadsheet tool that makes handling daily data tasks, merging sheets, and formatting a breeze without the heavy overhead.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
  2. 2. Install the Software: Run the installer and follow the simple on-screen instructions to set up WPS Office on your computer.
  3. 3. Open Your Spreadsheets: Launch WPS Spreadsheets and seamlessly open your existing Excel workbooks to manage your data with ease.
Fully compatible with Microsoft Excel formats (.xlsx, .xls, .csv).Lightweight application that runs smoothly on all devices without heavy background processes.Intuitive interface for easy data merging, filtering, and formatting.Free to use with comprehensive spreadsheet functions and tools.
microsoft office alternative - wps office

Frequently Asked Questions

Does changing cell color or alignment in Excel affect Power Query?

No, Power Query completely ignores cosmetic formatting like cell fill colors, font styles, and alignment. It only extracts the raw data and structural elements like tables and named ranges.

Why does Power Query return null values for my first row of data?

This typically happens if the column names in the source files have changed, if there are hidden line breaks/spaces, if extraneous blank rows were added above the headers, or if the data type applied in Power Query conflicts with the actual data.

How can I troubleshoot errors in a specific file when combining a folder?

In the Power Query Editor, temporarily bypass the combined query and connect directly to the single problematic file. Click through the 'Applied Steps' one by one to identify the exact step where your data transforms into nulls.

Should I use Tables or Sheets for Power Query sources?

It is highly recommended to format your source data as Named Tables (using Ctrl+T) rather than whole Sheets. Tables clearly define the data boundaries and prevent stray formatting or accidental keystrokes outside the range from interfering with your query.