O'Reilly logo

VBA and Macros for Microsoft Excel by Tracy Syrstad, Bill Jelen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

18Text File Processing

Despite the promise in Chapter 15, “XML in Excel 2003 Professional,” that XML will be the next great file format of the future, we still have a lot of files in CSV or TXT file format today.

VBA makes it easy to both read and write 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 three basic scenarios when reading from text files. If the file contains less than 65,536 records, it is easy to import the file using ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required