spreadsheet/ruleJS.all.full.js
function (cell) {
      var value,
          fnCellValue = instance.custom.cellValue,
          element = this,
          item = instance.matrix.getItem(cell);

      // check if custom cellValue fn exists
      if (instance.utils.isFunction(fnCellValue)) {

        var cellCoords = instance.utils.cellCoords(cell),
            cellId = instance.utils.translateCellCoords({row: element.row, col: element.col});

        // get value
        value = item ? item.value : fnCellValue(cellCoords.row, cellCoords.col);

        if (instance.utils.isNull(value)) {
          value = 0;
        }

        if (cellId) {
          //update dependencies
          instance.matrix.updateItem(cellId, {deps: [cell]});
        }

      } else {

        // get value
        value = item ? item.value : document.getElementById(cell).value;

        //update dependencies
        instance.matrix.updateElementItem(element, {deps: [cell]});
      }

      // check references error
      if (item && item.deps) {
        if (item.deps.indexOf(cellId) !== -1) {
          throw Error('REF');
        }
      }

      // check if any error occurs
      if (item && item.error) {
        throw Error(item.error);
      }

      // return value if is set
      if (instance.utils.isSet(value)) {
        var result = instance.helper.number(value);

        return !isNaN(result) ? result : value;
      }

      // cell is not available
      throw Error('NOT_AVAILABLE');
    }
function (cell) {
      var value,
          fnCellValue = instance.custom.cellValue,
          element = this,
          item = instance.matrix.getItem(cell);

      // check if custom cellValue fn exists
      if (instance.utils.isFunction(fnCellValue)) {

        var cellCoords = instance.utils.cellCoords(cell),
            cellId = instance.utils.translateCellCoords({row: element.row, col: element.col});

        // get value
        value = item ? item.value : fnCellValue(cellCoords.row, cellCoords.col);

        if (instance.utils.isNull(value)) {
          value = 0;
        }

        if (cellId) {
          //update dependencies
          instance.matrix.updateItem(cellId, {deps: [cell]});
        }

      } else {

        // get value
        value = item ? item.value : document.getElementById(cell).value;

        //update dependencies
        instance.matrix.updateElementItem(element, {deps: [cell]});
      }

      // check references error
      if (item && item.deps) {
        if (item.deps.indexOf(cellId) !== -1) {
          throw Error('REF');
        }
      }

      // check if any error occurs
      if (item && item.error) {
        throw Error(item.error);
      }

      // return value if is set
      if (instance.utils.isSet(value)) {
        var result = instance.helper.number(value);

        return !isNaN(result) ? result : value;
      }

      // cell is not available
      throw Error('NOT_AVAILABLE');
    }
function ( cell ) { var value , fnCellValue = instance . custom . cellValue , element = this , item = instance . matrix . getItem ( cell ) ; // check if custom cellValue fn exists if ( instance . utils . isFunction ( fnCellValue ) ) { var cellCoords = instance . utils . cellCoords ( cell ) , cellId = instance . utils . translateCellCoords ( { row : element . row , col : element . col } ) ; // get value value = item ? item . value : fnCellValue ( cellCoords . row , cellCoords . col ) ; if ( instance . utils . isNull ( value ) ) { value = 0 ; } if ( cellId ) { //update dependencies instance . matrix . updateItem ( cellId , { deps : [ cell ] } ) ; } } else { // get value value = item ? item . value : document . getElementById ( cell ) . value ; //update dependencies instance . matrix . updateElementItem ( element , { deps : [ cell ] } ) ; } // check references error if ( item && item . deps ) { if ( item . deps . indexOf ( cellId ) !== - 1 ) { throw Error ( 'REF' ) ; } } // check if any error occurs if ( item && item . error ) { throw Error ( item . error ) ; } // return value if is set if ( instance . utils . isSet ( value ) ) { var result = instance . helper . number ( value ) ; return ! isNaN ( result ) ? result : value ; } // cell is not available throw Error ( 'NOT_AVAILABLE' ) ; }
Get cell value
@param {String} cell => A1 AA1
@returns {*}
Get cell value