How To Load A Text File In Excel VBA With Load Data Infile

So for reference sake, here is something easy.

This is how to load a local text file into a variable, so you can process it.

For example:

So you have some JSON file, and you put the JSON formatted text locally in a text file so you can experiment on parsing it before you actually run a lot of web queries.

Well here is how to do it:

Now the contents of your text file are in the string strFileContent.

Questions?





Please remember to subscribe to my youtube channel

Been helped? Get these!

Facebooktwittergoogle_plusredditpinterestlinkedinmail