Write to excel error 0x800AC472

Has anyone run into this problem?

Sure haven’t. Can you show your input values?

I figured it out. I had a command window open in Excel. After closing the command window it works great.