I've looked extensively and tried to modify multiple sample sets of codes found on different posts in Stack Overflow as well as template documents in Google App Maker, but cannot for the life of me get an export and en email function to work.
UserRecords table:

This is the area where the data is collected and reviewed, the populated table:

These are the data fields I am working with:

This is what the exported Sheet looks like when I go through the motions and do an export through the Deployment tab:

Lastly, this is the email page that I've built based on tutorials and examples I've seen:

What I've learned so far (based on the circles I'm going round in):
Emails seem mostly straight forward, but I don't need to send a message, just an attachment with a subject, similar to using the code:
function sendEmail_(to, subject, body) { var emailObj = { to: to, subject: subject, htmlBody: body, noReply: true }; MailApp.sendEmail(emailObj); }
Not sure how to change the "body" to the exported document
- To straight up export and view the Sheet from a button click, the closest I've found to a solution is in Document Sample but the references in the code speak to components on the page only. I'm not sure how to modify this to use the table, and also what to change to get it as a sheet instead of a doc.
This may seem trivial to some but I'm a beginner and am struggling to wrap my head around what I'm doing wrong. I've been looking at this for nearly a week. Any help will be greatly appreciated.