I am making a code copy from spreadsheet to email however i am getting an error which keeps popping up
<SyntaxError: Unexpected token class('SheetConverter'>
my code.
function myFunction() {
var s = SpreadsheetApp.getActive().getSheetByName('MAIL');
var ss = SpreadsheetApp.getActiveSpreadsheet();
var range = ss.getActiveSheet().getDataRange();
var range = s.getRange('C7:I24');
var to = "example@ex.com" ;
var body = "";
var htmlTable = SheetConverter.convertRange2html(range);
var body = "Here is the table:<br/><br/>"
+ htmlTable
+ "<br/><br/>The end.";
MailApp.sendEmail(to, 'Subject', body, {htmlBody: body})
}
There is a bug report with respect to v8 support with the SheetConverter library. As a workaround in the short term, you could create the file yourself inside of your project and remove the library reference, copy the source code from here and edit lines 58-60 to read: