# Excel 2007: How to import a Huge TXT file?



## Mark53 (Nov 5, 2010)

Hi, people,

Using MS Excel 2007, importing a Huge .TXT file...
it will import only up to around line 1048400.
That's OK... it's about half of the file.

So, to get the next part of the file, I tried 
Data > From Text > (the file) > Start Import at Row > 1048399
and it takes a minute to get to that point in the file, 
and then it imports... only about 190 records.

Why will it not import more?

I tried completely exiting Excel, then restarting it.



Thanks.

Mark53


----------



## macropod (Apr 11, 2008)

Excel 2007 & later have a maximum of 1,048,576 rows. However, if all you're trying to do is to analyse the data, you don't need to load them into a worksheet - you can load them into memory arrays and process them there.

About 6 years ago, when I was using Excel 2000 (row limit - 65,536), I analysed a 12,000,000 line data set with only the final output (spanning ~150 rows & 100 columns) going to the worksheet. Even when all the data fit on a worksheet, doing so often slowed Excel down far more than memory array-processing.


----------



## Mark53 (Nov 5, 2010)

Well, thanks for the reply, Paul, 
but you didn't answer the question.

I do need to manipulate the data and use Excel functions on it,
so I do want to import it into Excel.

I'm trying to import the next part of the file, starting at record 1048400,
and it imports only about 190 records.

How can I get it to import another 1048576, instead of just 190?

Thanks.


----------



## Glaswegian (Sep 16, 2005)

I use Chip Pearson's code to import large text files.

Importing Big Text Files Into Excel

Even though we now use Excel 2010 at work, I still use this - you can tweak the code to decide the number of rows you want to appear in each sheet. And there are other tweaks you can make to suit your own circumstances.


----------



## macropod (Apr 11, 2008)

Hi Mark,

So where do you want to import them to? Another set of columns on the same sheet, another sheet, another workbook?


----------

