Google为当前用户打分 [英] Google sheets current user
本文介绍了Google为当前用户打分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望你能帮助我,
我正在寻找在单元格中显示google表格的当前用户以关闭vlookup, p>
我已经添加了一个脚本来将登录用户名拉入脚本库,但我无法将logger.log信息转储到Google工作表中。
任何信息都会很好, b
$ b
谢谢b $ b Nigel
解决方案
这工作正常:)请记住如何使用getRange(行,列),因为它将成为您最好的朋友,现在您正在编写脚本。
函数setActiveUser(){
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
//获取活动用户的电子邮件地址
var email = Session.getActiveUser()。getEmail();
Logger.log(email);
//将单元格A1设置为EMAIL活动用户地址
sheet.getRange(1,1).setValue(email);
}
I was hoping you could help me,
I'm looking to display the current user of a google sheet in a cell to pull a vlookup off,
I have added a script to pull the logged in username into a script gallery but I am unable to dump the logger.log information into a google sheet
Any information would be great,
thank you Nigel
解决方案
This works fine :) remember how to use getRange(row,column) as it will be your best friend now you are scripting..
function setActiveUser() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
// GET EMAIL ADDRESS OF ACTIVE USER
var email = Session.getActiveUser().getEmail();
Logger.log(email);
//SET CELL A1 TO EMAIL ADDRESS OF ACTIVE USER
sheet.getRange(1,1).setValue(email);
}
这篇关于Google为当前用户打分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文