I have located some similar posts but none of the solutions seemed to work.
I have a function that sends me an email PDF of a spreadsheet. I just want the email attachment to send the first sheet (tab) in the spreadsheet which is just titled "Report" I don't want it to send the other tabs. Can someone help me modify the script below to just send the first tab?
The script I have so far is:
function publish() { var message = { to: "Redacted email address", subject: "Report", body: "Attached is the report", name: "Report", attachments: [SpreadsheetApp.getActiveSpreadsheet().getAs(MimeType.PDF).setName("Report")] } MailApp.sendEmail(message);}









