“Things alter for the worse spontaneously, if they be not altered for the better designedly.” -Francis Bacon

Effectively working with and administering a Microsoft Windows based enterprise environment, let alone any other, requires making full use of all the tools that are made available to you and more often than not, making do with whatever is freely available. In the open source world of Linux this is generally not a problem as just about anything you could come up with a need for has not only already been created but is freely available and the things that aren’t, you can create yourself using any of the many free tools for scripting and programming that are available to fill those voids.

When it comes to system automation in a closed source environment such as Microsoft’s, the Visual Basic Scripting host is an invaluable tool that will let you handle just about every administrative task possible from mass updates to Active Directory to extensive data gathering and reporting; best of all, it is not only free, but it is already integrated into every Windows desktop. Of course, when it comes to automation you’re generally dealing with decently large amounts of data, either coming in, going out, or both; and while you can use simple text files for many things, it often makes more sense to leverage the power of a spreadsheet for both input and reported data.

I’m not looking to write the definitive article on how you can best use Excel with VBS, but my goal is to provide a good starting point, with a decent selection of sample source code to get the beginner or intermediate VBscripter up to speed and hopefully, leveraging Excel spreadsheets in no time, so let’s get started.

Lesson 1: Getting started
Let’s create a real simple script that simply shows us Excel.