Import large text files into Excel

sam88

Board Regular
Joined
Nov 1, 2006
Messages
80
I need to import large text files into Excel (more than 250000 lines). Is there any macro that will do this ?

I tried to use the macro that posted earlier but it did not run and gave me compile error.

Any help will be appreciated, thanks...
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi Sam,

Yes, a macro can do this. But exactly how to code this macro depends on how you want the 250000 lines imported. For example, do you want the file to be split among several worksheets (four would be required)? If so, do you want it split evenly, or each sheet (except the last) filled all the way to 65536 rows?

If your 250000 lines only consists of a few columns, then the columns can be wrapped such that they all fit on one sheet. But is this format acceptable to you?

Another possibility is that your 250000 lines of data don't all need to be read into Excel, such as when you have a file of financial transactions for a dozen stores, but you are only interested in importing the data for one store. If this is the case and the data would therefore all fit on one sheet, the data could be imported using VBA I/O such that only the data not of interest is skipped.

Damon
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,843
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top