Coding noob here, trying to learn...
I'm trying to take a range of cells in one google spreadsheet (not contiguous to any page/sheet border), convert the range to pdf, then email the pdf as an email attachment to a specified address. I can use a prewritten addin, but then I won't learn. A person only learns by asking questions.
I googled for answers, and got to this website (https://ctrlq.org/code/19869-email-google-spreadsheets-pdf). Trouble is, this script sends all of the sheets in a zip file. I don't want to do this. I just want to send, as a pdf, a range of selected cells located in only the first sheet and as a pdf, NOT a zip file.
My almost nonexistent javascript education tells me that my script uses the following code snippet to obtain the relevant data: (Obviously, I might be wrong...)
// Get the currently active spreadsheet URL (link)
// Or use SpreadsheetApp.openByUrl("<<SPREADSHEET URL>>");
var ss = SpreadsheetApp.getActiveSpreadsheet();
I don't know if I've got the correct snippet, which is why I included the URL of its source. Anyhow, I simply want to send a range starting at row 2 column 3 and ending at row 31 column 12. 7 days later, I want to use another script to send a different range.
How can I modify this script to achieve my goal?
Thanks to everyone who can help!
See Question&Answers more detail:os