samedi 28 mars 2020

please help me with the looping in order to compare in rows and columns

i have a google spreadsheet for attendance purpose. i want to make mark attendance for the Roll No taken as an input from the user(which is not an issue). the confusion is, how do i make a condition in the google's appscript where the attendance is marked by comparing the rollno by the entries in the rows and columns.

the sheet looks like this for eg.

the dates will be added in the coloumn by using this function(idk if it will work or not)

//CREATING NEW COLUMNS EVERYDAY AUTOMATICALLY

*function trig(){

var builder = ScriptApp.newTrigger("addcol").timeBased().everyDays(1);

var trigger = builder.create(); }

function addcol(){

var ss = SpreadsheetApp.getActiveSpreadsheet();

var sheet = ss.getSheetByName('ATTENDANCE'); var cname = builder.atDate(year, month, day)

var column = eventRange.getLastColumn() + 1;

sheet.insertColumnAfter(column).setName(cname);

sheet.getRange("E1").setValue(new Date()).setNumberFormat('d/M/yyyy');

var col = [];

for(var n=0 ; n

col.getLastColumn().push(['0']);

//the coloumns will automatically be filled by 0 and later overwritten by 1 if its marked

}

s.getRange('N:N').setValues(col);

}*

//===================================================

im taking input of the rollno. from user through android studio(and im getting the result here to gsheets for sure). but now for the prossessing part, what do i do in order to check the rollno. and mark the attendance in the coloumn?

S.S

Aucun commentaire:

Enregistrer un commentaire