CHAPTER 19Text file processing
In this chapter, you will:
Import from text files
Write text files
VBA simplifies both reading and writing from text files. This chapter covers importing from a text file and writing to a text file. Being able to write to a text file is useful when you need to write out data for another system to read or even when you need to produce HTML files.
Importing from text files
There are two basic scenarios when reading from text files. If a file contains fewer than 1,048,576 records, it is not difficult to import the file using the Workbooks.OpenText
method. If the file contains more than 1,048,576 records, you have to read the file one record at a time.
Importing text files with fewer than 1,048,576 rows
Text files ...
Get Microsoft Excel 2019 VBA and Macros, First Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.