Tag Archives: MSXML2

VBA – Read a File From a Webserver or Internet Website

I while back I needed to be able to read a file off of a web server. I found a couple ways to do so:

  • FTP into the webserver (assuming it is your web server and you have a valid login) and download the file locally, then read it like you would any other file
  • Use some browser automation (IE) to access the file and read it
  • Use the MSXML library to read the file

Using the MSXML Library to Read a File on a WebServer

The latter ended up working the best to suit my needs.  So I thought I’d show you a very simple function which allows you to do so in the hope it could serve someone else trying to do the same thing. Below is some sample code of how it can be done:

Continue reading