LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Read .TXT file line by line?

How to read a .TXT-file line by line?

I would like to read the first line of the .TXT-file,
Perform some action on the read data (the .TXT-line)

Read the next line - perform some action
Read the next line - perfom the action again
etc...

Until all lines of the .TXT-file is read, and the action is performed on
all lines (imported data)

My problem is that I have a HUGE .TXT-file of almost 3.000.000 lines!!!
I'm aware that going through all these lines, one-by-one, will probably
take a week or so, so I have to make my first test-program read a
smaller file, until I'm sure it is working.

But, how to read the file, line by line, in the first place, since I
can't import such a huge file in my trusty old XL2003?

Oh, I case you wonder what the 'action' is, I want to remove those lines
in the .TXT-file that doens't fullfill certain criteria, thus (hopefully
:-) ending up with a .TXT-file of only approx. 105.000 lines, which then
can be converted into a webtable.


Thanks in advance...

CE
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read the next line in a text file bluewatermist Excel Programming 12 January 19th 10 11:28 PM
Code to read file in reverse fast line by line ChristopherL Excel Programming 3 October 1st 08 12:45 AM
Read value from text file line, process, then Loop until EOF PcolaITGuy Excel Programming 10 April 23rd 08 03:54 PM
Textbox-read text line by line antonio Excel Programming 0 October 26th 04 05:42 PM
read last line of a file Mike[_49_] Excel Programming 4 November 25th 03 10:41 PM


All times are GMT +1. The time now is 06:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"