javascript - creating account by data from spreadsheet - google apps -



javascript - creating account by data from spreadsheet - google apps -

i working on simple script creates business relationship in command panel of domain - illustration gmail - , looking function in google apps script creates business relationship automatically on inserting info spreadsheet

i searched net , did find though : https://developers.google.com/apps-script/class_usermanager , method using : var user = usermanager.createuser("john.smith", "john", "smith", "password question is, how can insert parameters spreadsheet have. sorry if sounds bit stupid i'm new google apps script.

to read spreadsheet, utilize spreadsheetapp.

an illustration of reading set of rows. (let's rows).

var sheet = spreadsheetapp.getactivesheet(); var info = sheet.getdatarange().getvalues();

.getvalues() returns 2d array. access data[rownum][colnum]. let's want add together every row new user, do

for (var in data) { usermanager.createuser(data[i][0], data[i][1], data[i][2], data[i][3]); }

how run said script? set of within function (function addallusers()) , run run menu in script editor.

javascript google-apps-script google-docs google-apps

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -