Power Query Problems

Make Excel Power Query Use the First Row as Column Headers

Tauseeq MagsiTauseeq Magsi Nov 12, 2026 870 views

Question details

Promote the first valid row of an imported text file to column headers in Excel Power Query.

Make Excel Power Query Use the First Row as Column Headers
Product
Microsoft Excel Power Query
Device & OS
not provided
Scenario
A text or CSV file is imported into Power Query and the user wants its first data row to become the field names.
Observed behavior
Power Query creates default names such as Column1 and Column2, or promotes the wrong row because the file contains leading blank rows, comments, or inconsistent import formatting.
Before you start

Open the query in Power Query Editor and confirm which row contains the actual field names. If the source is a text or CSV file, verify its delimiter, text qualifier, and whether blank or comment lines appear before the header row.

Solution 1Recommended

Promote the first data row to headers in Power Query Editor

Use this when the correct header names are already visible in the first row of the Power Query preview.

1
Open Power Query Editor

In Excel, select Data > Queries & Connections, double-click the query, and open it in Power Query Editor.

2
Promote the header row

Select Home > Use First Row as Headers. You can also select Transform > Use First Row as Headers.

3
Check the resulting column names

Confirm that the displayed names match the source-file headers and that the next rows contain records rather than header text.

4
Apply the query changes

Select Home > Close & Load to return the corrected query results to Excel.

Promote the first data row to headers in Power Query Editor
Headers promoted successfully: Power Query adds a Promoted Headers step to the query, so the selected first row is used as the column names during refreshes.
Free Microsoft Office alternative

Work with Imported Spreadsheet Data in WPS Office

If you need a free, lightweight office suite for everyday spreadsheet work after importing or preparing text data, WPS Office provides a familiar spreadsheet interface and smooth migration from Microsoft Office files. Open, review, organize, and edit compatible workbook formats without changing your established workflow.

Free and lightweight spreadsheet tools for sorting, filtering, and organizing imported dataA familiar ribbon-style interface that helps Microsoft Office users transition quicklyCompatible with Microsoft Excel XLS and XLSX workbook formatsSupports common CSV and text-data workflows for spreadsheet preparation
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Query show Column1, Column2, and Column3 instead of my headers?

This occurs when the query has not promoted the first row. Open the query in Power Query Editor and select Home > Use First Row as Headers or Transform > Use First Row as Headers.

How do I skip a blank line before the header row in Power Query?

In Power Query Editor, select Home > Remove Rows > Remove Top Rows. Remove the blank or comment rows until the true header row is first, then select Home > Use First Row as Headers.

Can a comment line in a CSV file prevent header detection?

Yes. A leading comment line can be treated as the first row instead of the header row. Remove it in the source file or use Home > Remove Rows > Remove Top Rows before promoting headers.

What should I check when headers are split into the wrong columns?

Check the delimiter and encoding in the Source step settings. Select the gear icon next to Source when it is available, choose the correct delimiter and file origin, and confirm quoted text is using a consistent text qualifier.