logo
search
Power Query Problems

How to Create Multiple Power Query Queries from a Large Text File in Excel

Emma BrownEmma Brown Oct 16, 2026 870 views

Question details

The user needs to extract data from a 22-million-row text file using Power Query and load the results into multiple separate Excel worksheets because the dataset size exceeds standard worksheet limits.

How to Create Multiple Power Query Queries from One Large Text File in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Importing and segmenting a massive text dataset for analysis in Excel without losing data.
Observed behavior
Excel worksheets have a strict limit of 1,048,576 rows, making it impossible to load the entire 22-million-row text file into a single sheet without data truncation.
Before you start

Ensure you are running a 64-bit version of Office and have sufficient system RAM, as processing multi-million-row datasets in the Data Model is highly memory-intensive.

Solution 1Recommended

Load to the Data Model and Create Filtered Referenced Queries

Bypass the worksheet row limit by loading the entire dataset strictly as a connection to the Data Model, then create separate filtered queries to extract smaller chunks into standard worksheets.

By loading your massive text file directly to the Data Model, you avoid Excel's physical worksheet grid limits. Once the master connection is established, you can reference it multiple times to slice the data into manageable pieces.

1
Import the large text file

Open Excel, navigate to the 'Data' tab on the ribbon, click 'From Text/CSV', and browse to select your 22-million-row text file.

2
Load as a connection to the Data Model

In the preview window, click the drop-down arrow next to 'Load' and select 'Load To...'. Choose 'Only Create Connection' and check the box labeled 'Add this data to the Data Model'. Click 'OK'.

3
Create a referenced query

Open the 'Queries & Connections' pane on the right side of Excel. Right-click your newly created master connection and select 'Reference' to open the Power Query Editor with a linked query.

4
Filter the dataset

Apply filters to your columns (e.g., by date, category, or region) to ensure the resulting dataset contains fewer than 1,000,000 rows.

5
Load to a new worksheet

Click 'Close & Load To...' from the Home tab in the Power Query Editor. Select 'Table' and choose 'New worksheet'. Repeat the reference and filtering process for the remaining data.

Load to the Data Model and Create Filtered Referenced Queries
Alternative Analysis: If you do not strictly need the data in standard worksheets, you can leave it entirely in the Data Model and analyze the full 22-million rows directly using Power Pivot and PivotTables.
Free Microsoft Office alternative

Discover a Fast and Free Alternative for Your Everyday Spreadsheets

While extreme big-data tasks like processing 22-million rows are uniquely suited for specialized database tools or Excel's Data Model, WPS Office offers a completely free, lightning-fast, and highly compatible suite for your everyday data analysis and spreadsheet tasks. Enjoy a familiar interface without the heavy subscription costs.

  1. 1. Download the software: Visit the official WPS Office website and click the free download button.
  2. 2. Install WPS Office: Run the lightweight installer and follow the quick setup wizard.
  3. 3. Open your Excel files: Launch WPS Spreadsheet and instantly open your existing .xlsx and .csv files to continue working seamlessly.
Seamless compatibility with Microsoft Excel formats (.xlsx, .xls, .csv)Free, lightweight suite that saves system resources and runs smoothly on older devicesFamiliar ribbon interface ensuring a zero learning curvePowerful built-in pivot tables and advanced functions for everyday data analysis
microsoft office alternative - wps office

Frequently Asked Questions

What is the absolute maximum row limit in an Excel worksheet?

An Excel worksheet is strictly limited to 1,048,576 rows and 16,384 columns. If you try to load a dataset larger than this directly into a standard worksheet, Excel will truncate the data and display a warning.

Can I analyze a 22-million-row dataset in Excel without splitting it?

Yes, you can bypass the worksheet row limit by loading the massive dataset exclusively into the Data Model (selecting 'Only Create Connection' and 'Add this data to the Data Model'). From there, you can use Power Pivot or PivotTables to aggregate and analyze the full dataset.

Why does my Power Query connection fail when loading large text files?

Connection failures on massive files often occur due to system memory (RAM) limitations, especially if you are using a 32-bit version of Excel. Upgrading to 64-bit Office or filtering the dataset inside the Power Query Editor before loading it can resolve these stability issues.