When ran as a scheduled task, cannot save an Excel workbook when using Excel.Application COM object in PowerShell

http://serverfault.com/questions/266794/when-ran-as-a-scheduled-task-cannot-save-an-excel-workbook-when-using-excel-app

I'm having an issue where I've automated creating an Excel.Application COM object, add some data into a workbook, and then saving the document as an xlsx.

This works fine if: