How to get current user details in google sheets using app scripts.
var userEmail = Session.getActiveUser().getEmail();
Logger.log(‘User Email: ‘ + userEmail); // Log the user email for debugging
// Copy the old value to the next empty row in the target column
sheet.getRange(nextEmptyRow, 15).setValue(sourceValue);
sheet.getRange(nextEmptyRow, 16).setValue("userEmail ");
Here userEmail is not geeting to the mentioned cell. In log also userEmail is blank
need to save the current user to my 16th column