Error while running script

已查看 56 次
跳至第一个未读帖子

Abhishek Waghmare

未读,
2022年6月24日 09:06:032022/6/24
收件人 Google Apps Script Community
Hey,

I'm trying to run script which can autofill column whenever sheet gets new entry in sheet. able to run basic formulas with the same script but getting error when i'm using importrange with it. Please suggest




function myfunction() {
  var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();

  var lr = ss.getLastRow();
  var fillDownRange = ss.getRange(3,3,lr-1);
  ss.getRange ("C3").copyTo(fillDownRange);
}


Thankyou
Abhishek Waghmare

Jonathan Butler

未读,
2022年6月24日 11:15:432022/6/24
收件人 google-apps-sc...@googlegroups.com
What error are you getting?

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/37de26b3-c34e-4f8c-bebf-e5abdc5fdb5cn%40googlegroups.com.

Abhishek Waghmare

未读,
2022年6月24日 11:20:042022/6/24
收件人 google-apps-sc...@googlegroups.com
Syntax error missing ) after argument list line :3 file

You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/ZT6uQ8KOSoo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CAE9k5yB6qxFuxUL_DtbavBqok-EOyQRYkLGR%2BYuOCL9UOAJ4rQ%40mail.gmail.com.
Screenshot_2022-06-24-20-48-17-94_6012fa4d4ddec268fc5c7112cbb265e7.jpg
Screenshot_2022-06-24-20-48-05-87_6012fa4d4ddec268fc5c7112cbb265e7.jpg

Jonathan Butler

未读,
2022年6月24日 11:25:172022/6/24
收件人 google-apps-sc...@googlegroups.com
I didn't notice the screenshots initially, my bad. It's the quotation marks. When dealing with nested quotations marks, you need to either escape the inner quotation marks, or use different quotation marks outside of the inner quotation marks. Change the double quotation marks in the setFormula function to single quotation marks on the outside.

From this
To this

Abhishek Waghmare

未读,
2022年6月24日 11:27:472022/6/24
收件人 google-apps-sc...@googlegroups.com
Ok ok..

Thanks man 👍

Let me check if it's working.

回复全部
回复作者
转发
0 个新帖子