ShawnPCooke
Board Regular
- Joined
- May 14, 2007
- Messages
- 151
I'm automating the import of a particularly large CSV file. This file is generated by the user, and I want to validate that it is in the correct format (column order & names) before continuing the macro.
Ideally, I'd like to read the header row from the file before committing to opening the whole thing. Is there a way in VBA to read the first N characters from a text file before opening the whole file?
I already tried opening the file for text I/O, and just reading the first line, but that took longer than just importing the thing.
Thank you!
Ideally, I'd like to read the header row from the file before committing to opening the whole thing. Is there a way in VBA to read the first N characters from a text file before opening the whole file?
I already tried opening the file for text I/O, and just reading the first line, but that took longer than just importing the thing.
Thank you!