Google -> attach xlsx to email site:sap.com -> finds 207 posts, some have code included as well.
I'm also confused what exactly is the issue here... You need to get XLSX content somehow (it's not clear so far where exactly it'd be coming from) and then just use the above mentioned class to send the email. Attachment is added as binary content.
How could the SCN members possibly know what manipulation have you done in debugger and why a sample is not working afterwards?