与谷歌Apps脚本另一个的doGet()问题 - "宏观未知 - 的doGet QUOT;错误 [英] Another doGet() issue with Google Apps Script - "Unknown macro doGet" error

查看:181
本文介绍了与谷歌Apps脚本另一个的doGet()问题 - "宏观未知 - 的doGet QUOT;错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我'显然新谷歌Apps脚本,不过我有在C,PHP和Java编码的一些经验。因为我们想创造在我公司与谷歌Apps脚本小CRM,我们需要创建在谷歌网站上提供的申请书。我一直在寻找这个问题很长一段时间的答案,我还没有发现不幸任何答案。我有一个code是这样的:

I'am obviously new to Google Apps Script, nevertheless I have some experience in coding in C, PHP and Java. Since we would like to create a small CRM in our company with Google Apps Script, we need to create an application with a form available on Google Sites. I've been searching an answer for this problem a long time, I haven't unfortunately found any answer. I have a code like this:

var klienci_id = new Array(100);
var klienci_nazwa = new Array(100);
var klienci_adres = new Array(100);
var klienci_osoba = new Array(100);
var klienci_telefon = new Array(100);
var klienci_email = new Array(100);

function doGet(e) {
  var app = UiApp.createApplication();

   // hello world label
  var helloworldLabel = app.createLabel("I love Apps  Script!").setStyleAttribute("fontSize","16px");

  // add the label to the app container
  app.add(helloworldLabel);

  return app;
}


function main() {

 var klienci = SpreadsheetApp.openById("0ArsOaWajjzv9dEdGTUZCWFc1NnFva05uWkxETVF6Q0E");

 var kuchnia_polska = klienci.getSheetByName("Kuchnia polska");

 var dane = kuchnia_polska.getRange("D7:F22");

doGet();

}

和每次我尝试发布并进入给定链路出现错误未知宏观的doGet。我知道这是当有人不使用的doGet()函数,但我做一个共同的问题 - 它仍然无法正常工作。我还认为,谷歌应该建立在谷歌Apps脚本在thorought文档,将工作Unix手册的方式做,因为我只是无法通过的该死的帮助,所有这些奇怪的网页得到:)这既不是Windows帮助,也不是一个很好的手册;)

And everytime I try to publish it and enter the given link I get the error "Unknown macro doGet". I know this is a common problem when somebody doesn't use doGet() function but I do - and it still doesn't work. I also believe that Google should create a thorought documentation on Google Apps Script, which would work the way the Unix manual does, since I just cannot get through all these strange pages of goddamn help :) It's neither a Windows help, nor a good manual ;)

问候,
卡米尔

Regards, Kamil

推荐答案

我有一个怀疑你犯了一个版本一次,公布了应用程序,就到了真正的链接,而不是发展的链接,然后加入中的doGet()函数。当你犯了一个版本,它冻结在当时的code。该应用程序在发布的版本为code将在真正的链接运​​行(什么给你的用户),它可以让你保持编辑code,而不会干扰现有的用户版本的应用程序。有一个在发布对话框总是指的是最新版本的code的给你一个特殊的发展的链接,但将只为你并没有其他人的工作。

I have a suspicion that you made a "version" once, published the app, went to the "real" link and not the "development" link, and then added the doGet() function. When you make a version, it freezes the code at that time. The version that the app is published at is the version of the code that will run at the "real" link (what you give users), which allows you to keep editing the code without disturbing existing users of your app. There is a special "development" link given to you in the publish dialog that always refers to the most recent version of the code, but which will only work for you and no one else.

这篇关于与谷歌Apps脚本另一个的doGet()问题 - "宏观未知 - 的doGet QUOT;错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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