I am attempting to export a spreadsheet which is "created" daily through an automated e-mail in Google Apps Script. When attempting to convert to PDF I only get the top row shown in the PDF document (none of the data).
var file = DriveApp.getFileById(spreadsheet.getId()).getAs(MimeType.PDF);
MailApp.sendEmail('email', 'Equipment Update', 'Spreadsheet Attached', {
name: 'Testing',
attachments: [file]
});
I have checked and the spreadsheet does have the appropriate list of information on the sheet which is to be exported.
Any ideas as to what might be causing this?