|
-
Apr 27th, 2004, 06:04 AM
#1
Thread Starter
Addicted Member
File Access - Reading the Last Line?
This is for Excel97 VBA if it matters.
I've been trying to read up on the file access methods but I'm a little slow this morning:
(example) http://www.erlandsendata.no/english/...eaccessgeneral
OK, I'm reading a lot of Oracle .sql files (text files, sometimes very big that are created from Oracle queries). Some of these files can get up to 33MB or so. I read them into a spreadsheet and then make reports with them.
Is there a way to quickly read the last line (or last two lines) of the text file? With a 33MB text file it takes a LONG time to INPUT# each line in a loop just to get to the last line.
I'm just trying to make a preview window on a form to show the first 10 or so lines and then grab the last line (or last two lines) which contain some file info.
To sum up the question:
I want to open a txt file and INPUT# the first ten lines, then skip quickly to the last two lines and put those two lines in string variables.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|