dataSetApp.js
/**
* Validates that the required pure component data named ranges are available.
*
* @customfunction
*/
Validates that the required pure component data named ranges are available.
Validates that the required pure component data named ranges are available .
function validateWorkbook(){
  var PDataExists  = false
  var PDataPropertiesExist = false
  var PDataPropertyNamesExist = false
  var myWorkbook = SpreadsheetApp.getActiveSpreadsheet()
  var myRanges = myWorkbook.getNamedRanges()
  var numberOfSheets = SpreadsheetApp.getActiveSpreadsheet().getNumSheets()
  var mySheets = SpreadsheetApp.getActiveSpreadsheet().getSheets()
  for(var i = 0; i < myRanges.length; i++){
    if(myRanges[i].getName() === "PData_Properties"){
       PDataPropertiesExist = true
    }
    if(myRanges[i].getName() === "PData_PropertyNames"){
       PDataPropertyNamesExist = true
    }
  }
    if(PDataPropertiesExist && PDataPropertyNamesExist){
      return true
    }else{
      return false
    }
}
function validateWorkbook ( ) { var PDataExists = false var PDataPropertiesExist = false var PDataPropertyNamesExist = false var myWorkbook = SpreadsheetApp . getActiveSpreadsheet ( ) var myRanges = myWorkbook . getNamedRanges ( ) var numberOfSheets = SpreadsheetApp . getActiveSpreadsheet ( ) . getNumSheets ( ) var mySheets = SpreadsheetApp . getActiveSpreadsheet ( ) . getSheets ( ) for ( var i = 0 ; i < myRanges . length ; i ++ ) { if ( myRanges [ i ] . getName ( ) === "PData_Properties" ) { PDataPropertiesExist = true } if ( myRanges [ i ] . getName ( ) === "PData_PropertyNames" ) { PDataPropertyNamesExist = true } } if ( PDataPropertiesExist && PDataPropertyNamesExist ) { return true } else { return false } }
Validates that the required pure component data named ranges are available.
Validates that the required pure component data named ranges are available .