这是我当前的代码:
function doGet() {
var app = UiApp.createApplication().setTitle('When Am I Eligible?');
var panel = app.createVerticalPanel().setHeight("400px").setWidth("400px");
//var submitButton = app.createButton('Check');
var key= '???'
var ss = SpreadsheetApp.openById(key);
var sh = ss.getSheetByName('SHEET');
var last=ss.getLastRow();
var data=sh.getRange(1,1,last,2).getValues();
var valB= Session.getEffectiveUser();
for(nn=0;nn<data.length;++nn){
if (data[nn][1]==valB){
var final = data[nn][0]
break} ;// if a match in column B is found, break the loop
}
// var finish = data[nn][0];
var app = UiApp.getActiveApplication();
//var statusLabel = app.createLabel().setVisible(true).setText(String.valueOf(finish))
var answer = app.createLabel("BRO").setVisible(true).setText(final)
panel.add(answer);
app.add(panel);
return app;
}
它在我下面运行良好,但如果在我们的域下登录的其他人使用它,它说他们需要与他们共享电子表格。电子表格的性质阻止了这一点。有没有办法解决?