簡體   English   中英

Google Spreadsheet“您無權致電SHOW”

[英]Google Spreadsheet “you do not have permission to call SHOW”

嘗試跑步

function textVersion() {
  var app = UiApp.createApplication().setTitle('Time Picker');
  var main = app.createGrid(2, 4);
  var date = app.createDateBox().setName('date');
  var hour = app.createTextBox().setName('time').setWidth('150');
  var button = app.createButton('validate')
  main.setWidget(0,0,app.createLabel('Choose Date')).setWidget(0,1,app.createLabel('Enter Hours:minutes'))
  main.setWidget(1,0,date).setWidget(1,1,hour);
  main.setWidget(1,3,button)
  var handler = app.createServerHandler('show2').addCallbackElement(main)
  button.addClickHandler(handler)
  app.add(main)
  ss=SpreadsheetApp.getActive()


  ss.show(app) // here is problem , how to fix that ?

}

但是出現此錯誤, 您無權調用SHOW

這是真的。 如果我是正確的,那么您創建了一個函數,並試圖在電子表格中的“ = textVersion() ”單元格中使用它。 那是對的嗎? 在嘗試從單元格運行自定義函數並且該函數具有非法元素(例如“ ss.show()”)的情況下會發生這種情況。

請糾正我,因為我在這里承擔一些責任。 但是,如果到目前為止我的假設是正確的,則這里需要一個按鈕,因此您可以(在電子表格的頂部菜單中)插入>圖片。 然后右鍵單擊圖像,並為其分配腳本“ textVersion”。 然后,UI應該現在可以正常工作,因為它是由人而不是您的電子表格調用的。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM