Hello! Welcome to the forums.
It looks like you're trying to use the CreateEmail node's return as the attachment value on the function you are building. I think you should try first to use {{CreateExcel.data}}
since the python node doesn't return the object with the name of the variable you used. Instead it is contained in the .data property of the node.
If there is still an issue you may need to adjust the input to be encoded properly (like in the tooltip):
I didn't dive too deep so I'm not sure if there's a need for this for your content type.