PDA

View Full Version : Solved: read file with marker



kroz
11-01-2010, 11:51 PM
Hey guys,

I have a new issue for you.

Can you read specific information from a text file? I know how to open and process info from a text file that has a fixed number of lines but doing the same thing for a file with a variable number of line doesn't look so easy.

I have a text file with about 300k lines so i don't want to read it all - it will take forever. The info i need is between two keywords, 6 rows after the first and 4 rows above the second. I know this is a tricky request but i want the text between these two keywords to be used as input in my excel (with spaces between the columns).
Since the file is so big, I was thinking about using Free File to read the info. But reading only specific info.. no idea how to do that.

kroz
11-02-2010, 12:33 AM
I found that the issue has been answered very recently, sorry to double post.

mdmackillop
11-02-2010, 12:38 AM
Can you provide a link to the solution for the benefit of others who read this?

kroz
11-02-2010, 12:52 AM
The solution(more or less) http://www.vbaexpress.com/forum/showpost.php?p=228706&postcount=4