Vlad,
I tried to run what you had on the sample database and I got an error.Attachment 46720 Attachment 46721
I figured I'd give it a try on my actual one but I got the same error.
It does manage to save an excel file but it appears like this:Attachment 46722
I close it and reopen it and it looks like this:
This is close to what I want but I don't know if this is supposed to be the final result what with the error.