code: function(model, cellType) {
      if (!model) {
        return 0;
      }
  
      // if we have seen this style object before, assume it has the same styleId
      if (this.weakMap && this.weakMap.has(model)) {
        return this.weakMap.get(model);
      }
  
      var style = {};
      cellType = cellType || Enums.ValueType.Number;
  
      if (model.numFmt) {
        style.numFmtId = this._addNumFmtStr(model.numFmt);
      } else {
        switch (cellType) {
          case Enums.ValueType.Number:
            style.numFmtId = this._addNumFmtStr('General');
            break;
          case Enums.ValueType.Date:
            style.numFmtId = this._addNumFmtStr('mm-dd-yy');
            break;
          default:
            break;
        }
      }
  
      if (model.font) {
        style.fontId = this._addFont(model.font);
      }
  
      if (model.border) {
        style.borderId = this._addBorder(model.border);
      }
  
      if (model.fill) {
        style.fillId = this._addFill(model.fill);
      }
  
      if (model.alignment) {
        style.alignment = model.alignment;
      }
  
      var styleId = this._addStyle(style);
      if (this.weakMap) {
        this.weakMap.set(model, styleId);
      }
      return styleId;
    }
docs: add a cell's style model to the collection each style property is processed and cross-referenced, etc. the styleId is returned. Note: cellType is used when numFmt not defined