function(data, merges) {
      var ws = {};
      var range = { s: { c: 10000000, r: 10000000 }, e: { c: 0, r: 0 } };
      var types = this.typeConfig;
      for (var R = 0; R !== data.length; ++R) {
        for (var C = 0; C !== data[R].length; ++C) {
          if (range.s.r > R) range.s.r = R;
          if (range.s.c > C) range.s.c = C;
          if (range.e.r < R) range.e.r = R;
          if (range.e.c < C) range.e.c = C;
          var cell = data[R][C];
          if (!cell || !cell.v) continue;
          var cell_ref = XLSX.utils.encode_cell({ c: C, r: R });

          if (!cell.t) {
            if (types.number.assert(cell.v)) cell.t = _TYPE.NUMBER;
            else if (types.boolean.assert(cell.v)) cell.t = _TYPE.BOOLEAN;
            else if (types.date.assert(cell.v)) cell.t = _TYPE.DATE;
            else cell.t = _TYPE.STRING;
          }
          if (cell.t === _TYPE.DATE) {
            cell.t = _TYPE.NUMBER;
            cell.z = XLSX.SSF._table[14];
            cell.v = this.dateNum(cell.v);
          }
          ws[cell_ref] = cell;
        }
      }
      ws["!merges"] = merges;
      if (range.s.c < 10000000) ws["!ref"] = XLSX.utils.encode_range(range);
      return ws;
    }
function(data, merges) {
      var ws = {};
      var range = { s: { c: 10000000, r: 10000000 }, e: { c: 0, r: 0 } };
      var types = this.typeConfig;
      for (var R = 0; R !== data.length; ++R) {
        for (var C = 0; C !== data[R].length; ++C) {
          if (range.s.r > R) range.s.r = R;
          if (range.s.c > C) range.s.c = C;
          if (range.e.r < R) range.e.r = R;
          if (range.e.c < C) range.e.c = C;
          var cell = data[R][C];
          if (!cell || !cell.v) continue;
          var cell_ref = XLSX.utils.encode_cell({ c: C, r: R });

          if (!cell.t) {
            if (types.number.assert(cell.v)) cell.t = _TYPE.NUMBER;
            else if (types.boolean.assert(cell.v)) cell.t = _TYPE.BOOLEAN;
            else if (types.date.assert(cell.v)) cell.t = _TYPE.DATE;
            else cell.t = _TYPE.STRING;
          }
          if (cell.t === _TYPE.DATE) {
            cell.t = _TYPE.NUMBER;
            cell.z = XLSX.SSF._table[14];
            cell.v = this.dateNum(cell.v);
          }
          ws[cell_ref] = cell;
        }
      }
      ws["!merges"] = merges;
      if (range.s.c < 10000000) ws["!ref"] = XLSX.utils.encode_range(range);
      return ws;
    }
function ( data , merges ) { var ws = { } ; var range = { s : { c : 10000000 , r : 10000000 } , e : { c : 0 , r : 0 } } ; var types = this . typeConfig ; for ( var R = 0 ; R !== data . length ; ++ R ) { for ( var C = 0 ; C !== data [ R ] . length ; ++ C ) { if ( range . s . r > R ) range . s . r = R ; if ( range . s . c > C ) range . s . c = C ; if ( range . e . r < R ) range . e . r = R ; if ( range . e . c < C ) range . e . c = C ; var cell = data [ R ] [ C ] ; if ( ! cell || ! cell . v ) continue ; var cell_ref = XLSX . utils . encode_cell ( { c : C , r : R } ) ; if ( ! cell . t ) { if ( types . number . assert ( cell . v ) ) cell . t = _TYPE . NUMBER ; else if ( types . boolean . assert ( cell . v ) ) cell . t = _TYPE . BOOLEAN ; else if ( types . date . assert ( cell . v ) ) cell . t = _TYPE . DATE ; else cell . t = _TYPE . STRING ; } if ( cell . t === _TYPE . DATE ) { cell . t = _TYPE . NUMBER ; cell . z = XLSX . SSF . _table [ 14 ] ; cell . v = this . dateNum ( cell . v ) ; } ws [ cell_ref ] = cell ; } } ws [ "!merges" ] = merges ; if ( range . s . c < 10000000 ) ws [ "!ref" ] = XLSX . utils . encode_range ( range ) ; return ws ; }
Creates an Excel spreadsheet from a data string
@memberof TableExport.prototype
@param data {String}
@param merges {Object[]}
Creates an Excel spreadsheet from a data string