I'm currently using the script bellow to export and send a workbook as an email attachment. Is it possible to send multiple sheets as one attachment instead of the whole workbook?
function emailauto() {
var date = Utilities.formatDate(new Date(), 'America/Santiago', 'yyyy-MM-dd HH:mm:ss')
var emaila = ('email1@test.com,email2@test.com')
var url = "https://docs.google.com/spreadsheets/d/ + "FileID" + /export?format=xlsx&access_token=" + ScriptApp.getOAuthToken();
var file = UrlFetchApp.fetch(url).getBlob().setName("Filename_" + date + ".xlsx");
GmailApp.sendEmail(emaila, 'Test', 'Test date: ' + date + '.\n\nRegards.', {
attachments: [file],
name: 'Tester'
});
}