Programmatic PivotTable with VBScript and VBA

VBA has a lot going for it:

  • It comes with Excel.
  • The IDE has Intellisense, breakpoints, built-in reference and integrated library (for including ADO database tasks, for example).
  • Immediate window for interpreted Visual Basic
  • Watch window for tracking variable state, including arrays and Dictionary
  • Event-driven, simple, fast REPL development
  • Backed by spreadsheet-in-memory

VBScript can be used as glue – like Command Prompt – to leverage your existing code. You can create PivotTables from the command line!

See my gist for details.