Limiting the number of rows imported into Excel from a large CSV file

I have a large CSV file with approximately 70,000,000 rows. I have read how to import it into Excel as a data model and then pivot table here. Is there a way in Excel to just load a certain number of rows directly into a sheet, akin to SQLs TOP?


Solution 1:

I have only tried this with a CSV that is way smaller than 70 mill rows.

Go to data - get data, choose your CSV.

enter image description here

Click on the EDIT button to load it into power query editor. Under the Add Column Head add an index column.

enter image description here

Then filter on this column, using number less than, and choose your desired number of ROWS.

enter image description here

Return to the Home tab, and click close and load.

enter image description here

AS I say I have never used this with a CSV of that size so let me know how you get on.