Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering rows from textfile

Status
Not open for further replies.

flaviooooo

Programmer
Feb 24, 2003
496
FR
Hey,

I have a massive txt-file (62 MB, over 1 million rows) that contains a 10-digit code.

Now I need to filter out the codes on row 6,14,22,30,38,... (every 8th row, starting from row 6)

I don't think this is possible in textfile, so I'm pumping the data to Excel (in different sheets)

Now I'm wondering how I should proceed next? Is there a way to filter out by rownumbers ? Or is there a better/easier way to do this operation?

Thanks in advance for your help!
 
Take a look at FileSystemObject | TextStream | Line

Everybody is somebodys Nutter.
 
Alternatively, an SQL query - add a formula based field that = the row number and use this to derive a field that can be filtered out using the WHERE clause

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top