Thanks, but the problem is that I need to create the entire Excel document from scratch, dynamically, via the Python script. I want the script to add the macro code. -Chris