此消息不断弹出,< SyntaxError:意外的令牌类('SheetConverter'> [英] THIS message is keep poping up,,<SyntaxError: Unexpected token class('SheetConverter'>

查看:80
本文介绍了此消息不断弹出,< SyntaxError:意外的令牌类('SheetConverter'>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将代码从电子表格复制到电子邮件中,但是却出现错误,并且该错误不断弹出

I am making a code copy from spreadsheet to email however i am getting an error which keeps popping up

< SyntaxError:意外的令牌类('SheetConverter'>

<SyntaxError: Unexpected token class('SheetConverter'>

我的代码.

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})
}

推荐答案

有一个错误报告关于SheetConverter库对v8的支持.作为短期的解决方法,您可以在项目内部自己创建文件并删除库引用,然后从

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:

function objIsClass_(object,className) {
  return (toClass_.call(object).indexOf(className) !== -1);
}

这篇关于此消息不断弹出,&lt; SyntaxError:意外的令牌类('SheetConverter'&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆