This commit is contained in:
louiscklaw
2025-01-31 19:29:24 +08:00
parent 843c590c8b
commit abff74fd77
81 changed files with 7754 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
function checkLastRow(sheet, current_row) {
// return true if considered last row, false if not
// check email column only
output = {state:'init', debug:{sheet, current_row}, error:{}}
try {
var current_row_cell = getCell(
sheet,
current_row,
COL_STUDENT_PROGRESS_EMAIL_ADDRESS
);
var current_row_cell_1 = getCell(
sheet,
current_row + 1,
COL_STUDENT_PROGRESS_EMAIL_ADDRESS
);
var current_row_cell_2 = getCell(
sheet,
current_row + 2,
COL_STUDENT_PROGRESS_EMAIL_ADDRESS
);
var current_row_cell_3 = getCell(
sheet,
current_row + 3,
COL_STUDENT_PROGRESS_EMAIL_ADDRESS
);
var current_row_cell_4 = getCell(
sheet,
current_row + 4,
COL_STUDENT_PROGRESS_EMAIL_ADDRESS
);
var current_row_cell_5 = getCell(
sheet,
current_row + 5,
COL_STUDENT_PROGRESS_EMAIL_ADDRESS
);
var check_is_empty = [
isCellEmpty(current_row_cell),
isCellEmpty(current_row_cell_1),
isCellEmpty(current_row_cell_2),
isCellEmpty(current_row_cell_3),
isCellEmpty(current_row_cell_4),
isCellEmpty(current_row_cell_5),
];
return check_is_empty.indexOf(false) < 0;
} catch (error) {
output ={...output, error}
console.log("checkLastRow: error");
console.log(output)
return false;
}
}