function createCellHeadersRange(firstRowIndex, nextRowIndex) {
  var fromValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : firstRowIndex;
  var toValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : nextRowIndex;
  // Will swap `fromValue` with `toValue` if it's necessary.
  var from = fromValue,
      to = toValue;

  if (firstRowIndex > nextRowIndex) {
    var _ref = [to, from];
    from = _ref[0];
    to = _ref[1];
  }

  return "".concat(from, "-").concat(to);
}
Create range of values basing on cell indexes. For example, it will create below ranges for specified function arguments:

createCellHeadersRange(2, 7) => `2-7`
createCellHeadersRange(7, 2) => `2-7`
createCellHeadersRange(0, 4, 'A', 'D') => `A-D`
createCellHeadersRange(4, 0, 'D', 'A') => `A-D`

@param {number} firstRowIndex Index of "first" cell
@param {number} nextRowIndex Index of "next" cell
@param {*} fromValue Value which will represent "first" cell
@param {*} toValue Value which will represent "next" cell
@returns {String} Value representing range i.e. A-Z, 11-15.