function validateData()

in Code.gs [157:182]


function validateData(new_value) {
  var sheet = SpreadsheetApp.getActiveSheet();
  var range = null;
  try {
    range = sheet.getRange(new_value);
  } catch(e) {
    throw 'There is no data in the sheet.';
  }
  clearNotes();
  var start_row = parseInt(range.getRow())+1;
  var start_col = parseInt(range.getColumn());
  var formats = range.getNumberFormats();
  formats.shift();
  var header_formats = formats.shift();
  for(var r in formats) {
    for(var c in formats[r]) {
      if(formats[r][c] != header_formats[c]) {
        var note_row = start_row+1+parseInt(r);
        var note_col = start_col+parseInt(c);
        var cell = sheet.getRange(note_row,note_col)
        cell.setNote('Not the same format as first row. This may cause data to not be inserted into your cluster. ~SpreadsheetToES');
        throw "Not all data formats are the same. See the note in the sheet.";
      }
    }
  }
}