Lines Matching refs:model

392     value: function asInstance(model) {
393 return model instanceof Anchor || model == null ? model : new Anchor(model);
774 var model = this._value.model;
775 model.style = this.style;
778 model.comment = this._comment.model;
781 return model;
787 this._value.model = value;
815 this.model = {
854 return this.model.address;
857 this.model.address = value;
868 this.model = {
878 return this.model.value.toString();
886 return this.model.value.toString();
891 return this.model.value;
894 this.model.value = value;
909 return this.model.address;
912 this.model.address = value;
923 this.model = {
933 return "\"".concat(this.model.value.replace(/"/g, '""'), "\"");
941 return this.model.value;
946 return this.model.value;
949 this.model.value = value;
964 return this.model.address;
967 this.model.address = value;
978 this.model = {
988 return this.model.value.richText.map(function (t) {
1003 return this.model.value;
1006 this.model.value = value;
1021 return this.model.address;
1024 this.model.address = value;
1035 this.model = {
1045 return this.model.value.toISOString();
1053 return this.model.value.toString();
1058 return this.model.value;
1061 this.model.value = value;
1076 return this.model.address;
1079 this.model.address = value;
1090 this.model = {
1098 this.model.tooltip = value.tooltip;
1105 return this.model.hyperlink;
1113 return this.model.text;
1119 text: this.model.text,
1120 hyperlink: this.model.hyperlink
1123 if (this.model.tooltip) {
1124 v.tooltip = this.model.tooltip;
1130 this.model = {
1136 this.model.tooltip = value.tooltip;
1142 return this.model.text;
1145 this.model.text = value;
1158 return this.model.hyperlink;
1161 this.model.hyperlink = value;
1176 return this.model.address;
1179 this.model.address = value;
1190 this.model = {
1257 return this.model.address;
1260 this.model.address = value;
1272 this.model = {
1285 value: function _copyModel(model) {
1289 var value = model[name];
1322 if (!this._translatedFormula && this.model.sharedFormula) {
1324 var master = worksheet.findCell(this.model.sharedFormula);
1325 …this._translatedFormula = master && slideFormula(master.formula, master.address, this.model.addres…
1333 return "".concat(this.model.result || '');
1341 return this.model.result ? this.model.result.toString() : '';
1346 return this._copyModel(this.model);
1349 this.model = this._copyModel(value);
1365 return this.model.formula || this._getTranslatedFormula();
1368 this.model.formula = value;
1373 if (this.model.formula) {
1377 if (this.model.sharedFormula) {
1386 return this.model.result;
1389 this.model.result = value;
1399 var v = this.model.result;
1430 return this.model.address;
1433 this.model.address = value;
1444 this.model = {
1454 return this.model.value.toString();
1462 return this.model.value.toString();
1467 return this.model.value;
1470 this.model.value = value;
1485 return this.model.address;
1488 this.model.address = value;
1499 this.model = {
1509 return this.model.value ? 1 : 0;
1517 return this.model.value.toString();
1522 return this.model.value;
1525 this.model.value = value;
1540 return this.model.address;
1543 this.model.address = value;
1554 this.model = {
1572 return this.model.value.error.toString();
1577 return this.model.value;
1580 this.model.value = value;
1595 return this.model.address;
1598 this.model.address = value;
1609 this.model = {
1620 return this.model.value;
1628 return this.model.value;
1633 return this.model.rawValue;
1636 this.model.rawValue = value;
1637 this.model.value = JSON.stringify(value);
1652 return this.model.address;
1655 this.model.address = value;
2127 function DataValidations(model) {
2130 this.model = model || {};
2136 return this.model[address] = validation;
2141 return this.model[address];
2146 this.model[address] = undefined;
2478 function Image(worksheet, model) {
2482 this.model = model;
2501 tl: this.range.tl.model,
2502 br: this.range.br && this.range.br.model,
2612 value: function fromModel(model) {
2614 note.model = model;
2663 this.model = {
2673 this.model = {
2712 this.model = {
2713 top: value.model.top,
2714 left: value.model.left,
2715 bottom: value.model.bottom,
2716 right: value.model.right,
2724 this.model = {
2736 this.model = {
2744 this.model = {
2758 this.model = {
2773 if (!this.model.top || top < this.top) this.top = top;
2774 if (!this.model.left || left < this.left) this.left = left;
2775 if (!this.model.bottom || bottom > this.bottom) this.bottom = bottom;
2776 if (!this.model.right || right > this.right) this.right = right;
2835 return this.model.top || 1;
2838 this.model.top = value;
2843 return this.model.left || 1;
2846 this.model.left = value;
2851 return this.model.bottom || 1;
2854 this.model.bottom = value;
2859 return this.model.right || 1;
2862 this.model.right = value;
2867 return this.model.sheetName;
2870 this.model.sheetName = value;
2875 var sheetName = this.model.sheetName;
3327 var cellModel = cell.model;
3394 cell.model = cellModel;
4199 return worksheet.model;
4202 return ws.model;
4204 definedNames: this._definedNames.model,
4256 worksheet.model = worksheetModel;
4258 this._definedNames.model = value.definedNames;
4971 var model = {
4977 this._media.push(new Image(this, model));
4989 var model = {
4994 this._media.push(new Image(this, model));
5052 value: function addTable(model) {
5053 var table = new Table(this, model);
5054 this.tables[model.name] = table;
5094 value: function _parseRows(model) {
5098 model.rows.forEach(function (rowModel) {
5101 row.model = rowModel;
5106 value: function _parseMergeCells(model) {
5109 _.each(model.mergeCells, function (merge) {
5261 var model = {
5264 dataValidations: this.dataValidations.model,
5273 return medium.model;
5277 return table.model;
5283model.cols = Column.toModel(this.columns); // ====================================================…
5286 var rows = model.rows = [];
5287 var dimensions = model.dimensions = new Range();
5290 var rowModel = row && row.model;
5300 model.merges = [];
5303 model.merges.push(merge.range);
5306 return model;
5330 t.model = table;
7972 value: function reconcile(model, options) {// optional post-parse step (opposite to prepare)
7979 this.model = null; // if we have a map - reset them too
7995 this.model = Object.assign(this.model || {}, obj);
8074 return _context.abrupt("return", this.model);
8141 return _context.abrupt("return", this.model);
8183 value: function toXml(model) {
8185 this.render(xmlStream, model);
8195 return this.toXml(this.model);
8314 value: function render(xmlStream, model) {
8320 name: model.name,
8321 localSheetId: model.localSheetId
8323 xmlStream.writeText(model.ranges.join(','));
8348 this.model = {
8354 this.model.localSheetId = parseInt(this._parsedLocalSheetId, 10);
8458 value: function render(xmlStream, model) {
8460 sheetId: model.id,
8461 name: model.name,
8462 state: model.state,
8463 'r:id': model.rId
8470 this.model = {
8536 value: function render(xmlStream, model) {
8539 fullCalcOnLoad: model.fullCalcOnLoad ? 1 : undefined
8546 this.model = {};
8607 value: function render(xmlStream, model) {
8609 date1904: model.date1904 ? 1 : undefined,
8618 this.model = {
8681 value: function render(xmlStream, model) {
8683 xWindow: model.x || 0,
8684 yWindow: model.y || 0,
8685 windowWidth: model.width || 12000,
8686 windowHeight: model.height || 24000,
8687 firstSheet: model.firstSheet,
8688 activeTab: model.activeTab
8691 if (model.visibility && model.visibility !== 'visible') {
8692 attributes.visibility = model.visibility;
8701 var model = this.model = {};
8704 var s = value !== undefined ? model[name] = value : dflt;
8707 model[name] = s;
8712 var n = value !== undefined ? model[name] = parseInt(value, 10) : dflt;
8715 model[name] = n;
8829 value: function prepare(model) {
8830model.sheets = model.worksheets; // collate all the print areas from all of the sheets and add the…
8835 model.sheets.forEach(function (sheet) {
8873 model.definedNames = model.definedNames.concat(printAreas);
8876 (model.media || []).forEach(function (medium, i) {
8883 value: function render(xmlStream, model) {
8887 this.map.workbookPr.render(xmlStream, model.properties);
8888 this.map.bookViews.render(xmlStream, model.views);
8889 this.map.sheets.render(xmlStream, model.sheets);
8890 this.map.definedNames.render(xmlStream, model.definedNames);
8891 this.map.calcPr.render(xmlStream, model.calcProperties);
8936 this.model = {
8937 sheets: this.map.sheets.model,
8938 properties: this.map.workbookPr.model || {},
8939 views: this.map.bookViews.model,
8943 if (this.map.definedNames.model) {
8944 this.model.definedNames = this.map.definedNames.model;
8956 value: function reconcile(model) {
8957 var rels = (model.workbookRels || []).reduce(function (map, rel) {
8965 (model.sheets || []).forEach(function (sheet) {
8974 …worksheet = model.worksheetHash["xl/".concat(rel.Target.replace(/^(\s|\/xl\/)+/, ''))]; // If ther…
8990 _.each(model.definedNames, function (definedName) {
9033 model.definedNames = definedNames; // used by sheets to build their image models
9035 model.media.forEach(function (media, i) {
9103 var CommentXform = module.exports = function (model) {
9104 this.model = model;
9120 render: function render(xmlStream, model) {
9123 model = model || this.model;
9125 ref: model.ref,
9130 if (model && model.note && model.note.texts) {
9131 model.note.texts.forEach(function (text) {
9147 this.model = _objectSpread({
9175 this.model.note.texts.push(this.parser.model);
9211 render: function render(xmlStream, model) {
9214 model = model || this.model;
9224 model.comments.forEach(function (comment) {
9238 this.model = {
9263 this.model.comments.push(this.parser.model);
9309 function VmlPositionXform(model) {
9315 _this._model = model;
9321 value: function render(xmlStream, model, type) {
9322 if (model === type[2]) {
9324 } else if (this.tag === 'x:SizeWithCells' && model === type[1]) {
9333 this.model = {};
9334 this.model[this.tag] = true;
9393 function VmlProtectionXform(model) {
9399 _this._model = model;
9405 value: function render(xmlStream, model) {
9406 xmlStream.leafNode(this.tag, null, model);
9509 value: function render(xmlStream, model) {
9510 …var rect = model.anchor ? this.getAnchorRect(model.anchor) : this.getDefaultRect(model.refAddress);
9613 value: function render(xmlStream, model) {
9614 var _model$note = model.note,
9622 this.map['x:Anchor'].render(xmlStream, model);
9626 xmlStream.leafNode('x:Row', null, model.refAddress.row - 1);
9627 xmlStream.leafNode('x:Column', null, model.refAddress.col - 1);
9636 this.model = {
9685 …position = Object.assign({}, this.map['x:MoveWithCells'].model, this.map['x:SizeWithCells'].model);
9687 this.model.editAs = POSITION_TYPE[len];
9688 this.model.anchor = this.map['x:Anchor'].text;
9689 this.model.protection.locked = this.map['x:Locked'].text;
9690 this.model.protection.lockText = this.map['x:LockText'].text;
9756 value: function render(xmlStream, model) {
9783 model.comments.forEach(function (item, index) {
9799 this.model = {
9828 this.model.comments.push(this.parser.model);
9846 value: function reconcile(model, options) {
9849 model.anchors.forEach(function (anchor) {
9925 value: function render(xmlStream, model, index) {
9926 xmlStream.openNode('v:shape', VmlShapeXform.V_SHAPE_ATTRIBUTES(model, index));
9937 this.map['v:textbox'].render(xmlStream, model);
9938 this.map['x:ClientData'].render(xmlStream, model);
9952 this.model = {
9994 … this.model.margins.inset = this.map['v:textbox'].model && this.map['v:textbox'].model.inset;
9995 …this.model.protection = this.map['x:ClientData'].model && this.map['x:ClientData'].model.protectio…
9996 … this.model.anchor = this.map['x:ClientData'].model && this.map['x:ClientData'].model.anchor;
9997 … this.model.editAs = this.map['x:ClientData'].model && this.map['x:ClientData'].model.editAs;
10014 VmlShapeXform.V_SHAPE_ATTRIBUTES = function (model, index) {
10021 'o:insetmode': model.note.margins && model.note.margins.insetmode
10081 value: function render(xmlStream, model) {
10088 if (model && model.note) {
10089 var _ref = model.note && model.note.margins,
10114 this.model = {
10210 this.model = this.createNewModel(node);
10229 this.model[name] = parser.model;
10293 value: function render(xmlStream, model) {
10303 xmlStream.leafNode('vt:i4', undefined, model.length);
10369 value: function render(xmlStream, model) {
10372 size: model.length,
10375 model.forEach(function (sheet) {
10463 value: function render(xmlStream, model) {
10469 this.map.HeadingPairs.render(xmlStream, model.worksheets);
10470 this.map.TitleOfParts.render(xmlStream, model.worksheets);
10471 this.map.Company.render(xmlStream, model.company || '');
10472 this.map.Manager.render(xmlStream, model.manager);
10523 this.model = {
10524 worksheets: this.map.TitleOfParts.model,
10525 company: this.map.Company.model,
10526 manager: this.map.Manager.model
10596 value: function render(xmlStream, model) {
10600 (model.media || []).forEach(function (medium) {
10625 model.worksheets.forEach(function (worksheet) {
10640 var hasSharedStrings = model.sharedStrings && model.sharedStrings.count;
10649 if (model.tables) {
10650 model.tables.forEach(function (table) {
10658 if (model.drawings) {
10659 model.drawings.forEach(function (drawing) {
10667 if (model.commentRefs) {
10672 model.commentRefs.forEach(function (_ref) {
10820 value: function render(xmlStream, model) {
10823 this.map['dc:creator'].render(xmlStream, model.creator);
10824 this.map['dc:title'].render(xmlStream, model.title);
10825 this.map['dc:subject'].render(xmlStream, model.subject);
10826 this.map['dc:description'].render(xmlStream, model.description);
10827 this.map['dc:identifier'].render(xmlStream, model.identifier);
10828 this.map['dc:language'].render(xmlStream, model.language);
10829 this.map['cp:keywords'].render(xmlStream, model.keywords);
10830 this.map['cp:category'].render(xmlStream, model.category);
10831 this.map['cp:lastModifiedBy'].render(xmlStream, model.lastModifiedBy);
10832 this.map['cp:lastPrinted'].render(xmlStream, model.lastPrinted);
10833 this.map['cp:revision'].render(xmlStream, model.revision);
10834 this.map['cp:version'].render(xmlStream, model.version);
10835 this.map['cp:contentStatus'].render(xmlStream, model.contentStatus);
10836 this.map['cp:contentType'].render(xmlStream, model.contentType);
10837 this.map['dcterms:created'].render(xmlStream, model.created);
10838 this.map['dcterms:modified'].render(xmlStream, model.modified);
10886 this.model = {
10887 creator: this.map['dc:creator'].model,
10888 title: this.map['dc:title'].model,
10889 subject: this.map['dc:subject'].model,
10890 description: this.map['dc:description'].model,
10891 identifier: this.map['dc:identifier'].model,
10892 language: this.map['dc:language'].model,
10893 keywords: this.map['cp:keywords'].model,
10894 category: this.map['cp:category'].model,
10895 lastModifiedBy: this.map['cp:lastModifiedBy'].model,
10896 lastPrinted: this.map['cp:lastPrinted'].model,
10897 revision: this.map['cp:revision'].model,
10898 contentStatus: this.map['cp:contentStatus'].model,
10899 contentType: this.map['cp:contentType'].model,
10900 created: this.map['dcterms:created'].model,
10901 modified: this.map['dcterms:modified'].model
10970 value: function render(xmlStream, model) {
10971 xmlStream.leafNode('Relationship', model);
10978 this.model = node.attributes;
11050 value: function render(xmlStream, model) {
11053 model = model || this._values;
11056 model.forEach(function (relationship) {
11071 this.model = [];
11097 this.model.push(this.parser.model);
11171 this.model = {
11199 value: function reconcilePicture(model, options) {
11200 if (model && model.rId) {
11201 var rel = options.rels[model.rId];
11268 value: function render(xmlStream, model) {
11270 this.map['a:blip'].render(xmlStream, model); // TODO: options for this + parsing
11318 this.model = this.map['a:blip'].model;
11377 value: function render(xmlStream, model) {
11380 'r:embed': model.rId,
11389 this.model = {
11561 value: function render(xmlStream, model) {
11563 id: model.index,
11564 name: "Picture ".concat(model.index)
11566 this.map['a:hlinkClick'].render(xmlStream, model);
11567 this.map['a:extLst'].render(xmlStream, model);
11611 this.model = this.map['a:hlinkClick'].model;
11694 value: function render(xmlStream, model) {
11696 this.map['xdr:col'].render(xmlStream, model.nativeCol);
11697 this.map['xdr:colOff'].render(xmlStream, model.nativeColOff);
11698 this.map['xdr:row'].render(xmlStream, model.nativeRow);
11699 this.map['xdr:rowOff'].render(xmlStream, model.nativeRowOff);
11747 this.model = {
11748 nativeCol: this.map['xdr:col'].model,
11749 nativeColOff: this.map['xdr:colOff'].model,
11750 nativeRow: this.map['xdr:row'].model,
11751 nativeRowOff: this.map['xdr:rowOff'].model
11802 function getAnchorType(model) {
11803 var range = typeof model.range === 'string' ? colCache.decode(model.range) : model.range;
11827 value: function prepare(model) {
11830 model.anchors.forEach(function (item, index) {
11840 value: function render(xmlStream, model) {
11845 model.anchors.forEach(function (item) {
11862 this.model = {
11891 this.model.anchors.push(this.parser.model);
11909 value: function reconcile(model, options) {
11912 model.anchors.forEach(function (anchor) {
12075 value: function render(xmlStream, model) {
12077 var width = Math.floor(model.width * EMU_PER_PIXEL_AT_96_DPI);
12078 var height = Math.floor(model.height * EMU_PER_PIXEL_AT_96_DPI);
12087 this.model = {
12155 value: function render(xmlStream, model) {
12156 if (!(model.hyperlinks && model.hyperlinks.rId)) {
12162 'r:id': model.hyperlinks.rId,
12163 tooltip: model.hyperlinks.tooltip
12171 this.model = {
12254 value: function render(xmlStream, model) {
12256 this.map['xdr:cNvPr'].render(xmlStream, model);
12257 this.map['xdr:cNvPicPr'].render(xmlStream, model);
12301 this.model = this.map['xdr:cNvPr'].model;
12383 value: function prepare(model, options) {
12384 this.map['xdr:pic'].prepare(model.picture, options);
12388 value: function render(xmlStream, model) {
12390 editAs: model.range.editAs || 'oneCell'
12392 this.map['xdr:from'].render(xmlStream, model.range.tl);
12393 this.map['xdr:ext'].render(xmlStream, model.range.ext);
12394 this.map['xdr:pic'].render(xmlStream, model.picture);
12411 this.model.range.tl = this.map['xdr:from'].model;
12412 this.model.range.ext = this.map['xdr:ext'].model;
12413 this.model.picture = this.map['xdr:pic'].model;
12423 value: function reconcile(model, options) {
12424 model.medium = this.reconcilePicture(model.picture, options);
12494 value: function prepare(model, options) {
12495 model.index = options.index + 1;
12499 value: function render(xmlStream, model) {
12501 this.map['xdr:nvPicPr'].render(xmlStream, model);
12502 this.map['xdr:blipFill'].render(xmlStream, model);
12503 this.map['xdr:spPr'].render(xmlStream, model);
12539 this.mergeModel(this.parser.model);
12659 value: function prepare(model, options) {
12660 this.map['xdr:pic'].prepare(model.picture, options);
12664 value: function render(xmlStream, model) {
12666 editAs: model.range.editAs || 'oneCell'
12668 this.map['xdr:from'].render(xmlStream, model.range.tl);
12669 this.map['xdr:to'].render(xmlStream, model.range.br);
12670 this.map['xdr:pic'].render(xmlStream, model.picture);
12687 this.model.range.tl = this.map['xdr:from'].model;
12688 this.model.range.br = this.map['xdr:to'].model;
12689 this.model.picture = this.map['xdr:pic'].model;
12699 value: function reconcile(model, options) {
12700 model.medium = this.reconcilePicture(model.picture, options);
12765 value: function prepare(model, options) {
12768 if (model) {
12769 model.forEach(function (childModel, index) {
12777 value: function render(xmlStream, model) {
12778 if (this.always || model && model.length) {
12782 xmlStream.addAttribute(this.$count, model && model.length || 0);
12786 (model || []).forEach(function (childModel, index) {
12804 this.model = [];
12828 this.model.push(this.parser.model);
12831 if (this.maxItems && this.model.length > this.maxItems) {
12843 value: function reconcile(model, options) {
12844 if (model) {
12846 model.forEach(function (childModel) {
12900 value: function render(xmlStream, model) {
12901 if (model) {
12902 if (typeof model === 'string') {
12905 ref: model
12916 var firstAddress = getAddress(model.from);
12917 var secondAddress = getAddress(model.to);
12931 this.model = node.attributes.ref;
13050 value: function prepare(model, options) {
13051 var styleId = options.styles.addStyleModel(model.style || {}, getEffectiveCellType(model));
13054 model.styleId = styleId;
13057 if (model.comment) {
13058 options.comments.push(_objectSpread(_objectSpread({}, model.comment), {}, {
13059 ref: model.address
13063 switch (model.type) {
13067 model.ssId = options.sharedStrings.add(model.value);
13074 model.date1904 = true;
13080 if (options.sharedStrings && model.text !== undefined && model.text !== null) {
13081 model.ssId = options.sharedStrings.add(model.text);
13085 address: model.address,
13086 target: model.hyperlink,
13087 tooltip: model.tooltip
13092 options.merges.add(model);
13098 model.date1904 = true;
13101 if (model.shareType === 'shared') {
13102 model.si = options.siFormulae++;
13105 if (model.formula) {
13106 options.formulae[model.address] = model;
13107 } else if (model.sharedFormula) {
13108 var master = options.formulae[model.sharedFormula];
13111 …ror("Shared Formula master must exist above and or left of clone for cell ".concat(model.address));
13117 master.range = new Range(master.address, model.address);
13119 master.range.expandToAddress(model.address);
13122 model.si = master.si;
13133 value: function renderFormula(xmlStream, model) {
13136 switch (model.shareType) {
13140 ref: model.ref || model.range.range,
13141 si: model.si
13148 ref: model.ref
13153 if (model.si !== undefined) {
13156 si: model.si
13163 switch (getValueType(model.result)) {
13166 xmlStream.leafNode('f', attrs, model.formula);
13172 xmlStream.leafNode('f', attrs, model.formula);
13173 xmlStream.leafNode('v', null, model.result);
13177 xmlStream.leafNode('f', attrs, model.formula);
13178 xmlStream.leafNode('v', null, model.result);
13183 xmlStream.leafNode('f', attrs, model.formula);
13184 xmlStream.leafNode('v', null, model.result ? 1 : 0);
13189 xmlStream.leafNode('f', attrs, model.formula);
13190 xmlStream.leafNode('v', null, model.result.error);
13194 xmlStream.leafNode('f', attrs, model.formula);
13195 xmlStream.leafNode('v', null, utils.dateToExcel(model.result, model.date1904));
13206 value: function render(xmlStream, model) {
13209 if (model.type === Enums.ValueType.Null && !model.styleId) {
13215 xmlStream.addAttribute('r', model.address);
13217 if (model.styleId) {
13218 xmlStream.addAttribute('s', model.styleId);
13221 switch (model.type) {
13226 xmlStream.leafNode('v', null, model.value);
13231 xmlStream.leafNode('v', null, model.value ? '1' : '0');
13236 xmlStream.leafNode('v', null, model.value.error);
13241 if (model.ssId !== undefined) {
13243 xmlStream.leafNode('v', null, model.ssId);
13244 } else if (model.value && model.value.richText) {
13247 model.value.richText.forEach(function (text) {
13253 xmlStream.leafNode('v', null, model.value);
13259 xmlStream.leafNode('v', null, utils.dateToExcel(model.value, model.date1904));
13263 if (model.ssId !== undefined) {
13265 xmlStream.leafNode('v', null, model.ssId);
13268 xmlStream.leafNode('v', null, model.text);
13274 this.renderFormula(xmlStream, model);
13298 this.model = {
13304 this.model.styleId = parseInt(node.attributes.s, 10);
13311 this.model.si = node.attributes.si;
13312 this.model.shareType = node.attributes.t;
13313 this.model.ref = node.attributes.ref;
13343 this.model.formula = this.model.formula ? this.model.formula + text : text;
13348 if (this.model.value && this.model.value.richText) {
13349 …this.model.value.richText.text = this.model.value.richText.text ? this.model.value.richText.text +…
13351 this.model.value = this.model.value ? this.model.value + text : text;
13366 var model = this.model; // first guess on cell type
13368 if (model.formula || model.shareType) {
13369 model.type = Enums.ValueType.Formula;
13371 if (model.value) {
13373 model.result = utils.xmlDecode(model.value);
13375 model.result = parseInt(model.value, 10) !== 0;
13377 model.result = {
13378 error: model.value
13381 model.result = parseFloat(model.value);
13384 model.value = undefined;
13386 } else if (model.value !== undefined) {
13389 model.type = Enums.ValueType.String;
13390 model.value = parseInt(model.value, 10);
13394 model.type = Enums.ValueType.String;
13395 model.value = utils.xmlDecode(model.value);
13399 model.type = Enums.ValueType.String;
13403 model.type = Enums.ValueType.Boolean;
13404 model.value = parseInt(model.value, 10) !== 0;
13408 model.type = Enums.ValueType.Error;
13409 model.value = {
13410 error: model.value
13415 model.type = Enums.ValueType.Number;
13416 model.value = parseFloat(model.value);
13419 } else if (model.styleId) {
13420 model.type = Enums.ValueType.Null;
13422 model.type = Enums.ValueType.Merge;
13444 this.model.value = this.model.value || {};
13445 this.model.value.richText = this.model.value.richText || [];
13446 this.model.value.richText.push(this.parser.model);
13462 value: function reconcile(model, options) {
13463 var style = model.styleId && options.styles && options.styles.getStyleModel(model.styleId);
13466 model.style = style;
13469 if (model.styleId !== undefined) {
13470 model.styleId = undefined;
13473 switch (model.type) {
13475 if (typeof model.value === 'number') {
13477 model.value = options.sharedStrings.getString(model.value);
13481 if (model.value.richText) {
13482 model.type = Enums.ValueType.RichText;
13489 model.type = Enums.ValueType.Date;
13490 model.value = utils.excelToDate(model.value, options.date1904);
13496 if (model.result !== undefined && style && utils.isDateFmt(style.numFmt)) {
13497 model.result = utils.excelToDate(model.result, options.date1904);
13500 if (model.shareType === 'shared') {
13501 if (model.ref) {
13503 options.formulae[model.si] = model.address;
13506 model.sharedFormula = options.formulae[model.si];
13507 delete model.shareType;
13510 delete model.si;
13520 var hyperlink = options.hyperlinkMap[model.address];
13523 if (model.type === Enums.ValueType.Formula) {
13524 model.text = model.result;
13525 model.result = undefined;
13527 model.text = model.value;
13528 model.value = undefined;
13531 model.type = Enums.ValueType.Hyperlink;
13532 model.hyperlink = hyperlink;
13535 var comment = options.commentsMap && options.commentsMap[model.address];
13538 model.comment = comment;
13593 value: function render(xmlStream, model) {
13595 iconSet: model.iconSet,
13596 iconId: model.iconId
13603 this.model = {
13687 value: function prepare(model) {
13688 if (CfRuleExtXform.isExt(model)) {
13689 model.x14Id = "{".concat(uuidv4(), "}").toUpperCase();
13694 value: function render(xmlStream, model) {
13695 if (!CfRuleExtXform.isExt(model)) {
13699 switch (model.type) {
13701 this.renderDataBar(xmlStream, model);
13705 this.renderIconSet(xmlStream, model);
13711 value: function renderDataBar(xmlStream, model) {
13714 id: model.x14Id
13716 this.databarXform.render(xmlStream, model);
13721 value: function renderIconSet(xmlStream, model) {
13724 priority: model.priority,
13725 id: model.x14Id || "{".concat(uuidv4(), "}")
13727 this.iconSetXform.render(xmlStream, model);
13743 Object.assign(this.model, parser.model);
13821 value: function render(xmlStream, model) {
13823 type: model.type
13826 if (model.value !== undefined) {
13827 this.fExtXform.render(xmlStream, model.value);
13844 this.model.value = parser.model ? parseFloat(parser.model) : 0;
13911 value: function prepare(model, options) {
13914 model.rules.forEach(function (rule) {
13920 value: function render(xmlStream, model) {
13923 if (!model.rules.some(CfRuleExtXform.isExt)) {
13930 model.rules.filter(CfRuleExtXform.isExt).forEach(function (rule) {
13934 this.sqRef.render(xmlStream, model.ref);
13949 this.model.ref = parser.model;
13953 this.model.rules.push(parser.model);
14019 value: function hasContent(model) {
14020 if (model.hasExtContent === undefined) {
14021 model.hasExtContent = model.some(function (cf) {
14026 return model.hasExtContent;
14030 value: function prepare(model, options) {
14033 model.forEach(function (cf) {
14039 value: function render(xmlStream, model) {
14042 if (this.hasContent(model)) {
14044 model.forEach(function (cf) {
14059 this.model.push(parser.model);
14141 value: function render(xmlStream, model) {
14145 minLength: BaseXform.toIntAttribute(model.minLength, 0, true),
14146 maxLength: BaseXform.toIntAttribute(model.maxLength, 100, true),
14147 border: BaseXform.toBoolAttribute(model.border, false),
14148 gradient: BaseXform.toBoolAttribute(model.gradient, true),
14149 …negativeBarColorSameAsPositive: BaseXform.toBoolAttribute(model.negativeBarColorSameAsPositive, tr…
14150 …negativeBarBorderColorSameAsPositive: BaseXform.toBoolAttribute(model.negativeBarBorderColorSameAs…
14151 axisPosition: BaseXform.toAttribute(model.axisPosition, 'auto'),
14152 direction: BaseXform.toAttribute(model.direction, 'leftToRight')
14154 model.cfvo.forEach(function (cfvo) {
14157 this.borderColorXform.render(xmlStream, model.borderColor);
14158 this.negativeBorderColorXform.render(xmlStream, model.negativeBorderColor);
14159 this.negativeFillColorXform.render(xmlStream, model.negativeFillColor);
14160 this.axisColorXform.render(xmlStream, model.axisColor);
14188 this.model.cfvo.push(parser.model);
14192 this.model[prop] = parser.model;
14255 value: function render(xmlStream, model) {
14256 xmlStream.leafNode(this.tag, null, model);
14261 this.model = '';
14266 this.model += text;
14350 value: function render(xmlStream, model) {
14354 iconSet: BaseXform.toStringAttribute(model.iconSet),
14355 reverse: BaseXform.toBoolAttribute(model.reverse, false),
14356 showValue: BaseXform.toBoolAttribute(model.showValue, true),
14357 custom: BaseXform.toBoolAttribute(model.icons, false)
14359 model.cfvo.forEach(function (cfvo) {
14363 if (model.icons) {
14364 model.icons.forEach(function (icon, i) {
14393 this.model.cfvo.push(parser.model);
14397 if (!this.model.icons) {
14398 this.model.icons = [];
14401 this.model.icons.push(parser.model);
14405 this.model[prop] = parser.model;
14461 value: function render(xmlStream, model) {
14462 xmlStream.leafNode(this.tag, null, model);
14467 this.model = '';
14472 this.model += text;
14544 var getTextFormula = function getTextFormula(model) {
14545 if (model.formulae && model.formulae[0]) {
14546 return model.formulae[0];
14549 var range = new Range(model.ref);
14552 switch (model.operator) {
14554 return "NOT(ISERROR(SEARCH(\"".concat(model.text, "\",").concat(tl, ")))");
14573 var getTimePeriodFormula = function getTimePeriodFormula(model) {
14574 if (model.formulae && model.formulae[0]) {
14575 return model.formulae[0];
14578 var range = new Range(model.ref);
14581 switch (model.timePeriod) {
14663 value: function render(xmlStream, model) {
14664 switch (model.type) {
14666 this.renderExpression(xmlStream, model);
14670 this.renderCellIs(xmlStream, model);
14674 this.renderTop10(xmlStream, model);
14678 this.renderAboveAverage(xmlStream, model);
14682 this.renderDataBar(xmlStream, model);
14686 this.renderColorScale(xmlStream, model);
14690 this.renderIconSet(xmlStream, model);
14694 this.renderText(xmlStream, model);
14698 this.renderTimePeriod(xmlStream, model);
14704 value: function renderExpression(xmlStream, model) {
14707 dxfId: model.dxfId,
14708 priority: model.priority
14710 this.formulaXform.render(xmlStream, model.formulae[0]);
14715 value: function renderCellIs(xmlStream, model) {
14720 dxfId: model.dxfId,
14721 priority: model.priority,
14722 operator: model.operator
14724 model.formulae.forEach(function (formula) {
14731 value: function renderTop10(xmlStream, model) {
14734 dxfId: model.dxfId,
14735 priority: model.priority,
14736 percent: BaseXform.toBoolAttribute(model.percent, false),
14737 bottom: BaseXform.toBoolAttribute(model.bottom, false),
14738 rank: BaseXform.toIntValue(model.rank, 10, true)
14743 value: function renderAboveAverage(xmlStream, model) {
14746 dxfId: model.dxfId,
14747 priority: model.priority,
14748 aboveAverage: BaseXform.toBoolAttribute(model.aboveAverage, true)
14753 value: function renderDataBar(xmlStream, model) {
14756 priority: model.priority
14758 this.databarXform.render(xmlStream, model);
14759 this.extLstRefXform.render(xmlStream, model);
14764 value: function renderColorScale(xmlStream, model) {
14767 priority: model.priority
14769 this.colorScaleXform.render(xmlStream, model);
14774 value: function renderIconSet(xmlStream, model) {
14776 if (!CfRuleXform.isPrimitive(model)) {
14782 priority: model.priority
14784 this.iconSetXform.render(xmlStream, model);
14789 value: function renderText(xmlStream, model) {
14791 type: model.operator,
14792 dxfId: model.dxfId,
14793 priority: model.priority,
14794 operator: BaseXform.toStringAttribute(model.operator, 'containsText')
14796 var formula = getTextFormula(model);
14806 value: function renderTimePeriod(xmlStream, model) {
14809 dxfId: model.dxfId,
14810 priority: model.priority,
14811 timePeriod: model.timePeriod
14813 var formula = getTimePeriodFormula(model);
14844 Object.assign(this.model, parser.model);
14849 this.model.formulae = this.model.formulae || [];
14850 this.model.formulae.push(parser.model);
14918 value: function render(xmlStream, model) {
14920 type: model.type,
14921 val: model.value
14927 this.model = {
15000 value: function render(xmlStream, model) {
15004 model.cfvo.forEach(function (cfvo) {
15007 model.color.forEach(function (color) {
15023 this.model[name].push(parser.model);
15085 value: function render(xmlStream, model) {
15089 if (!model.rules.some(CfRuleXform.isPrimitive)) {
15094 sqref: model.ref
15096 model.rules.forEach(function (rule) {
15098 rule.ref = model.ref;
15117 this.model.rules.push(parser.model);
15190 this.model = [];
15194 value: function prepare(model, options) {
15196 var nextPriority = model.reduce(function (p, cf) {
15201 model.forEach(function (cf) {
15215 value: function render(xmlStream, model) {
15218 model.forEach(function (cf) {
15252 this.model.push(this.parser.model);
15264 value: function reconcile(model, options) {
15265 model.forEach(function (cf) {
15337 value: function render(xmlStream, model) {
15341 model.cfvo.forEach(function (cfvo) {
15344 this.colorXform.render(xmlStream, model.color);
15359 this.model.cfvo.push(parser.model);
15363 this.model.color = parser.model;
15422 value: function render(xmlStream, model) {
15423 xmlStream.leafNode(this.tag, null, model);
15428 this.model = '';
15433 this.model += text;
15469 value: function render(xmlStream, model) {
15474 this.idXform.render(xmlStream, model.x14Id);
15485 this.model.x14Id = parser.model;
15516 value: function render(xmlStream, model) {
15518 this.map.ext.render(xmlStream, model);
15529 Object.assign(this.model, parser.model);
15583 value: function render(xmlStream, model) {
15584 xmlStream.leafNode(this.tag, null, model);
15589 this.model = '';
15594 this.model += text;
15663 value: function render(xmlStream, model) {
15667 iconSet: BaseXform.toStringAttribute(model.iconSet, '3TrafficLights'),
15668 reverse: BaseXform.toBoolAttribute(model.reverse, false),
15669 showValue: BaseXform.toBoolAttribute(model.showValue, true)
15671 model.cfvo.forEach(function (cfvo) {
15690 this.model[name].push(parser.model);
15744 value: function prepare(model, options) {
15745 var styleId = options.styles.addStyleModel(model.style || {});
15748 model.styleId = styleId;
15753 value: function render(xmlStream, model) {
15755 xmlStream.addAttribute('min', model.min);
15756 xmlStream.addAttribute('max', model.max);
15758 if (model.width) {
15759 xmlStream.addAttribute('width', model.width);
15762 if (model.styleId) {
15763 xmlStream.addAttribute('style', model.styleId);
15766 if (model.hidden) {
15770 if (model.bestFit) {
15774 if (model.outlineLevel) {
15775 xmlStream.addAttribute('outlineLevel', model.outlineLevel);
15778 if (model.collapsed) {
15789 var model = this.model = {
15796 model.styleId = parseInt(node.attributes.style, 10);
15800 model.hidden = true;
15804 model.bestFit = true;
15808 model.outlineLevel = parseInt(node.attributes.outlineLevel, 10);
15812 model.collapsed = true;
15830 value: function reconcile(model, options) {
15832 if (model.styleId) {
15833 model.style = options.styles.getStyleModel(model.styleId);
15920 function optimiseDataValidations(model) {
15923 var dvList = _.map(model, function (dataValidation, address) {
15939 if (!model[otherAddress] || !_.isEqual(model[addr.address], model[otherAddress])) {
15962 while (model[otherAddress] && _.isEqual(dv.dataValidation, model[otherAddress])) {
16012 value: function render(xmlStream, model) {
16013 var optimizedModel = optimiseDataValidations(model);
16084 this.model = {};
16160 _this.model[address] = _this._dataValidation;
16163 _this.model[addr] = _this._dataValidation;
16254 value: function render(xmlStream, model) {
16255 if (model) {
16257 ref: model
16265 this.model = node.attributes.ref;
16331 value: function render(xmlStream, model) {
16332 if (model) {
16334 'r:id': model.rId
16343 this.model = {
16421 value: function hasContent(model) {
16422 return this.conditionalFormattings.hasContent(model.conditionalFormattings);
16426 value: function prepare(model, options) {
16427 this.conditionalFormattings.prepare(model.conditionalFormattings, options);
16431 value: function render(xmlStream, model) {
16436 this.conditionalFormattings.render(xmlStream, model.conditionalFormattings);
16447 this.model[name] = parser.model;
16478 value: function prepare(model, options) {
16479 this.ext.prepare(model, options);
16483 value: function hasContent(model) {
16484 return this.ext.hasContent(model);
16488 value: function render(xmlStream, model) {
16489 if (!this.hasContent(model)) {
16494 this.ext.render(xmlStream, model);
16505 Object.assign(this.model, parser.model);
16559 value: function render(xmlStream, model) {
16560 if (model) {
16565 if (model.differentFirst) {
16570 if (model.differentOddEven) {
16575 if (model.oddHeader && typeof model.oddHeader === 'string') {
16576 xmlStream.leafNode('oddHeader', null, model.oddHeader);
16580 if (model.oddFooter && typeof model.oddFooter === 'string') {
16581 xmlStream.leafNode('oddFooter', null, model.oddFooter);
16585 if (model.evenHeader && typeof model.evenHeader === 'string') {
16586 xmlStream.leafNode('evenHeader', null, model.evenHeader);
16590 if (model.evenFooter && typeof model.evenFooter === 'string') {
16591 xmlStream.leafNode('evenFooter', null, model.evenFooter);
16595 if (model.firstHeader && typeof model.firstHeader === 'string') {
16596 xmlStream.leafNode('firstHeader', null, model.firstHeader);
16600 if (model.firstFooter && typeof model.firstFooter === 'string') {
16601 xmlStream.leafNode('firstFooter', null, model.firstFooter);
16618 this.model = {};
16621 this.model.differentFirst = parseInt(node.attributes.differentFirst, 0) === 1;
16625 this.model.differentOddEven = parseInt(node.attributes.differentOddEven, 0) === 1;
16663 this.model.oddHeader = text;
16667 this.model.oddFooter = text;
16671 this.model.evenHeader = text;
16675 this.model.evenFooter = text;
16679 this.model.firstHeader = text;
16683 this.model.firstFooter = text;
16759 value: function render(xmlStream, model) {
16761 ref: model.address,
16762 'r:id': model.rId,
16763 tooltip: model.tooltip
16770 this.model = {
16840 value: function render(xmlStream, model) {
16842 ref: model
16849 this.model = node.attributes.ref;
17002 value: function render(xmlStream, model) {
17003 if (model && (isDefined(model.summaryBelow) || isDefined(model.summaryRight))) {
17005 summaryBelow: isDefined(model.summaryBelow) ? Number(model.summaryBelow) : undefined,
17006 summaryRight: isDefined(model.summaryRight) ? Number(model.summaryRight) : undefined
17017 this.model = {
17086 value: function render(xmlStream, model) {
17087 xmlStream.leafNode('brk', model);
17093 this.model = node.attributes.ref;
17161 value: function render(xmlStream, model) {
17162 if (model) {
17164 left: model.left,
17165 right: model.right,
17166 top: model.top,
17167 bottom: model.bottom,
17168 header: model.header,
17169 footer: model.footer
17184 this.model = {
17258 value: function render(xmlStream, model) {
17259 if (model && model.fitToPage) {
17261 fitToPage: model.fitToPage ? '1' : undefined
17272 this.model = {
17329 function booleanToXml(model) {
17330 return model ? '1' : undefined;
17333 function pageOrderToXml(model) {
17334 switch (model) {
17336 return model;
17343 function cellCommentsToXml(model) {
17344 switch (model) {
17347 return model;
17354 function errorsToXml(model) {
17355 switch (model) {
17359 return model;
17383 value: function render(xmlStream, model) {
17384 if (model) {
17386 paperSize: model.paperSize,
17387 orientation: model.orientation,
17388 horizontalDpi: model.horizontalDpi,
17389 verticalDpi: model.verticalDpi,
17390 pageOrder: pageOrderToXml(model.pageOrder),
17391 blackAndWhite: booleanToXml(model.blackAndWhite),
17392 draft: booleanToXml(model.draft),
17393 cellComments: cellCommentsToXml(model.cellComments),
17394 errors: errorsToXml(model.errors),
17395 scale: model.scale,
17396 fitToWidth: model.fitToWidth,
17397 fitToHeight: model.fitToHeight,
17398 firstPageNumber: model.firstPageNumber,
17399 useFirstPageNumber: booleanToXml(model.firstPageNumber),
17400 usePrinterDefaults: booleanToXml(model.usePrinterDefaults),
17401 copies: model.copies
17416 this.model = {
17500 value: function render(xmlStream, model) {
17501 if (model) {
17503 'r:id': model.rId
17512 this.model = {
17570 function booleanToXml(model) {
17571 return model ? '1' : undefined;
17587 value: function render(xmlStream, model) {
17588 if (model) {
17590 headings: booleanToXml(model.showRowColHeaders),
17591 gridLines: booleanToXml(model.showGridLines),
17592 horizontalCentered: booleanToXml(model.horizontalCentered),
17593 verticalCentered: booleanToXml(model.verticalCentered)
17608 this.model = {
17688 value: function render(xmlStream, model) {
17689 if (model && model.length) {
17693 xmlStream.addAttribute(this.$count, model.length);
17694 xmlStream.addAttribute('manualBreakCount', model.length);
17698 model.forEach(function (childModel) {
17762 value: function prepare(model, options) {
17763 var styleId = options.styles.addStyleModel(model.style);
17766 model.styleId = styleId;
17770 model.cells.forEach(function (cellModel) {
17776 value: function render(xmlStream, model, options) {
17778 xmlStream.addAttribute('r', model.number);
17780 if (model.height) {
17781 xmlStream.addAttribute('ht', model.height);
17785 if (model.hidden) {
17789 if (model.min > 0 && model.max > 0 && model.min <= model.max) {
17790 xmlStream.addAttribute('spans', "".concat(model.min, ":").concat(model.max));
17793 if (model.styleId) {
17794 xmlStream.addAttribute('s', model.styleId);
17800 if (model.outlineLevel) {
17801 xmlStream.addAttribute('outlineLevel', model.outlineLevel);
17804 if (model.collapsed) {
17809 model.cells.forEach(function (cellModel) {
17827 var model = this.model = {
17835 model.styleId = parseInt(node.attributes.s, 10);
17839 model.hidden = true;
17843 model.bestFit = true;
17847 model.height = parseFloat(node.attributes.ht);
17851 model.outlineLevel = parseInt(node.attributes.outlineLevel, 10);
17855 model.collapsed = true;
17882 this.model.cells.push(this.parser.model);
17884 if (this.maxItems && this.model.cells.length > this.maxItems) {
17898 value: function reconcile(model, options) {
17899 model.style = model.styleId ? options.styles.getStyleModel(model.styleId) : {};
17901 if (model.styleId !== undefined) {
17902 model.styleId = undefined;
17906 model.cells.forEach(function (cellModel) {
17964 value: function render(xmlStream, model) {
17965 if (model) {
17967 defaultRowHeight: model.defaultRowHeight,
17968 outlineLevelRow: model.outlineLevelRow,
17969 outlineLevelCol: model.outlineLevelCol,
17970 'x14ac:dyDescent': model.dyDescent
17973 if (model.defaultColWidth) {
17974 attributes.defaultColWidth = model.defaultColWidth;
17978 if (!model.defaultRowHeight || model.defaultRowHeight !== 15) {
17993 this.model = {
18001 this.model.defaultColWidth = parseFloat(node.attributes.defaultColWidth);
18083 value: function render(xmlStream, model) {
18084 if (model) {
18088 inner = this.map.tabColor.render(xmlStream, model.tabColor) || inner;
18089 inner = this.map.pageSetUpPr.render(xmlStream, model.pageSetup) || inner;
18090 inner = this.map.outlinePr.render(xmlStream, model.outlineProperties) || inner;
18142 if (this.map.tabColor.model || this.map.pageSetUpPr.model || this.map.outlinePr.model) {
18143 this.model = {};
18145 if (this.map.tabColor.model) {
18146 this.model.tabColor = this.map.tabColor.model;
18149 if (this.map.pageSetUpPr.model) {
18150 this.model.pageSetup = this.map.pageSetUpPr.model;
18153 if (this.map.outlinePr.model) {
18154 this.model.outlineProperties = this.map.outlinePr.model;
18157 this.model = null;
18203 function booleanToXml(model, value) {
18204 return model ? value : undefined;
18224 value: function render(xmlStream, model) {
18225 if (model) {
18227 sheet: booleanToXml(model.sheet, '1'),
18228 selectLockedCells: model.selectLockedCells === false ? '1' : undefined,
18229 selectUnlockedCells: model.selectUnlockedCells === false ? '1' : undefined,
18230 formatCells: booleanToXml(model.formatCells, '0'),
18231 formatColumns: booleanToXml(model.formatColumns, '0'),
18232 formatRows: booleanToXml(model.formatRows, '0'),
18233 insertColumns: booleanToXml(model.insertColumns, '0'),
18234 insertRows: booleanToXml(model.insertRows, '0'),
18235 insertHyperlinks: booleanToXml(model.insertHyperlinks, '0'),
18236 deleteColumns: booleanToXml(model.deleteColumns, '0'),
18237 deleteRows: booleanToXml(model.deleteRows, '0'),
18238 sort: booleanToXml(model.sort, '0'),
18239 autoFilter: booleanToXml(model.autoFilter, '0'),
18240 pivotTables: booleanToXml(model.pivotTables, '0')
18243 if (model.sheet) {
18244 attributes.algorithmName = model.algorithmName;
18245 attributes.hashValue = model.hashValue;
18246 attributes.saltValue = model.saltValue;
18247 attributes.spinCount = model.spinCount;
18248 attributes.objects = booleanToXml(model.objects === false, '1');
18249 attributes.scenarios = booleanToXml(model.scenarios === false, '1');
18264 this.model = {
18284 this.model.algorithmName = node.attributes.algorithmName;
18285 this.model.hashValue = node.attributes.hashValue;
18286 this.model.saltValue = node.attributes.saltValue;
18287 this.model.spinCount = parseInt(node.attributes.spinCount, 10);
18364 value: function prepare(model) {
18365 switch (model.state) {
18371 model.state = 'normal';
18377 value: function render(xmlStream, model) {
18379 workbookViewId: model.workbookViewId || 0
18388 add('rightToLeft', '1', model.rightToLeft === true);
18389 add('tabSelected', '1', model.tabSelected);
18390 add('showRuler', '0', model.showRuler === false);
18391 add('showRowColHeaders', '0', model.showRowColHeaders === false);
18392 add('showGridLines', '0', model.showGridLines === false);
18393 add('zoomScale', model.zoomScale, model.zoomScale);
18394 add('zoomScaleNormal', model.zoomScaleNormal, model.zoomScaleNormal);
18395 add('view', model.style, model.style);
18401 switch (model.state) {
18403 xSplit = model.xSplit || 0;
18404 ySplit = model.ySplit || 0;
18405 topLeftCell = model.topLeftCell || colCache.getAddress(ySplit + 1, xSplit + 1).address;
18406 …activePane = model.xSplit && model.ySplit && 'bottomRight' || model.xSplit && 'topRight' || 'botto…
18408 xSplit: model.xSplit || undefined,
18409 ySplit: model.ySplit || undefined,
18416 activeCell: model.activeCell,
18417 sqref: model.activeCell
18422 if (model.activePane === 'topLeft') {
18423 model.activePane = undefined;
18427 xSplit: model.xSplit || undefined,
18428 ySplit: model.ySplit || undefined,
18429 topLeftCell: model.topLeftCell,
18430 activePane: model.activePane
18433 pane: model.activePane,
18434 activeCell: model.activeCell,
18435 sqref: model.activeCell
18440 if (model.activeCell) {
18442 activeCell: model.activeCell,
18443 sqref: model.activeCell
18505 var model;
18511 model = this.model = {
18526 if (this.model.state === 'split') {
18527 model.activePane = this.pane.activePane;
18533 model.activeCell = selection.activeCell;
18537 model.style = this.sheetView.style;
18540 model = this.model = {
18553 model.activeCell = selection.activeCell;
18557 model.style = this.sheetView.style;
18622 value: function render(xmlStream, model) {
18623 if (model) {
18625 'r:id': model.rId
18634 this.model = {
18755 var mergeConditionalFormattings = function mergeConditionalFormattings(model, extModel) {
18760 return model;
18763 if (!model || !model.length) {
18770 model.forEach(function (cf) {
18792 model.push({
18800 return model;
18875 value: function prepare(model, options) {
18879 model.hyperlinks = options.hyperlinks = [];
18880 model.comments = options.comments = [];
18883 this.map.cols.prepare(model.cols, options);
18884 this.map.sheetData.prepare(model.rows, options);
18885 this.map.conditionalFormatting.prepare(model.conditionalFormattings, options);
18886 model.mergeCells = options.merges.mergeCells; // prepare relationships
18888 var rels = model.rels = [];
18894 model.hyperlinks.forEach(function (hyperlink) {
18905 if (model.comments.length > 0) {
18909 Target: "../comments".concat(model.id, ".xml")
18915 Target: "../drawings/vmlDrawing".concat(model.id, ".vml")
18918 model.comments.forEach(function (item) {
18922 commentName: "comments".concat(model.id),
18923 vmlDrawing: "vmlDrawing".concat(model.id)
18929 model.media.forEach(function (medium) {
18938 model.background = {
18941 model.image = options.media[medium.imageId];
18943 var drawing = model.drawing;
18947 drawing = model.drawing = {
19000 model.tables.forEach(function (table) {
19019 this.map.extLst.prepare(model, options);
19023 value: function render(xmlStream, model) {
19026 var sheetFormatPropertiesModel = model.properties ? {
19027 defaultRowHeight: model.properties.defaultRowHeight,
19028 dyDescent: model.properties.dyDescent,
19029 outlineLevelCol: model.properties.outlineLevelCol,
19030 outlineLevelRow: model.properties.outlineLevelRow
19033 if (model.properties && model.properties.defaultColWidth) {
19034 sheetFormatPropertiesModel.defaultColWidth = model.properties.defaultColWidth;
19038 outlineProperties: model.properties && model.properties.outlineProperties,
19039 tabColor: model.properties && model.properties.tabColor,
19040 pageSetup: model.pageSetup && model.pageSetup.fitToPage ? {
19041 fitToPage: model.pageSetup.fitToPage
19044 var pageMarginsModel = model.pageSetup && model.pageSetup.margins;
19046 showRowColHeaders: model.pageSetup && model.pageSetup.showRowColHeaders,
19047 showGridLines: model.pageSetup && model.pageSetup.showGridLines,
19048 horizontalCentered: model.pageSetup && model.pageSetup.horizontalCentered,
19049 verticalCentered: model.pageSetup && model.pageSetup.verticalCentered
19051 var sheetProtectionModel = model.sheetProtection;
19053 this.map.dimension.render(xmlStream, model.dimensions);
19054 this.map.sheetViews.render(xmlStream, model.views);
19056 this.map.cols.render(xmlStream, model.cols);
19057 this.map.sheetData.render(xmlStream, model.rows);
19060 this.map.autoFilter.render(xmlStream, model.autoFilter);
19061 this.map.mergeCells.render(xmlStream, model.mergeCells);
19062 …this.map.conditionalFormatting.render(xmlStream, model.conditionalFormattings); // Note: must be b…
19064 …this.map.dataValidations.render(xmlStream, model.dataValidations); // For some reason hyperlinks h…
19066 this.map.hyperlinks.render(xmlStream, model.hyperlinks);
19070 this.map.pageSetup.render(xmlStream, model.pageSetup);
19071 this.map.headerFooter.render(xmlStream, model.headerFooter);
19072 this.map.rowBreaks.render(xmlStream, model.rowBreaks);
19073 this.map.drawing.render(xmlStream, model.drawing); // Note: must be after rowBreaks
19075 this.map.picture.render(xmlStream, model.background); // Note: must be after drawing
19077 this.map.tableParts.render(xmlStream, model.tables);
19078 this.map.extLst.render(xmlStream, model);
19080 if (model.rels) {
19082 model.rels.forEach(function (rel) {
19138 var properties = this.map.sheetFormatPr.model || {};
19140 if (this.map.sheetPr.model && this.map.sheetPr.model.tabColor) {
19141 properties.tabColor = this.map.sheetPr.model.tabColor;
19144 if (this.map.sheetPr.model && this.map.sheetPr.model.outlineProperties) {
19145 properties.outlineProperties = this.map.sheetPr.model.outlineProperties;
19149 …fitToPage: this.map.sheetPr.model && this.map.sheetPr.model.pageSetup && this.map.sheetPr.model.pa…
19150 margins: this.map.pageMargins.model
19152 … pageSetup = Object.assign(sheetProperties, this.map.pageSetup.model, this.map.printOptions.model);
19153 …itionalFormattings(this.map.conditionalFormatting.model, this.map.extLst.model && this.map.extLst.
19154 this.model = {
19155 dimensions: this.map.dimension.model,
19156 cols: this.map.cols.model,
19157 rows: this.map.sheetData.model,
19158 mergeCells: this.map.mergeCells.model,
19159 hyperlinks: this.map.hyperlinks.model,
19160 dataValidations: this.map.dataValidations.model,
19162 views: this.map.sheetViews.model,
19164 headerFooter: this.map.headerFooter.model,
19165 background: this.map.picture.model,
19166 drawing: this.map.drawing.model,
19167 tables: this.map.tableParts.model,
19171 if (this.map.autoFilter.model) {
19172 this.model.autoFilter = this.map.autoFilter.model;
19175 if (this.map.sheetProtection.model) {
19176 this.model.sheetProtection = this.map.sheetProtection.model;
19189 value: function reconcile(model, options) {
19192 var rels = (model.relationships || []).reduce(function (h, rel) {
19196 model.comments = options.comments[rel.Target].comments;
19199 if (rel.Type === RelType.VmlDrawing && model.comments && model.comments.length) {
19201 model.comments.forEach(function (comment, index) {
19208 options.commentsMap = (model.comments || []).reduce(function (h, comment) {
19215 options.hyperlinkMap = (model.hyperlinks || []).reduce(function (h, hyperlink) {
19224 model.rows = model.rows && model.rows.filter(Boolean) || [];
19225 model.rows.forEach(function (row) {
19228 this.map.cols.reconcile(model.cols, options);
19229 this.map.sheetData.reconcile(model.rows, options);
19230 this.map.conditionalFormatting.reconcile(model.conditionalFormattings, options);
19231 model.media = [];
19233 if (model.drawing) {
19234 var drawingRel = rels[model.drawing.rId];
19248 model.media.push(image);
19254 var backgroundRel = model.background && rels[model.background.rId];
19261 model.media.push({
19268 model.tables = (model.tables || []).map(function (tablePart) {
19272 delete model.relationships;
19273 delete model.hyperlinks;
19274 delete model.comments;
19335 value: function render(xmlStream, model) {
19336 if (model) {
19345 this.model = true;
19423 value: function render(xmlStream, model) {
19424 if (model) {
19432 xmlStream.addAttribute(this.attr, this._format(model));
19434 xmlStream.writeText(this._format(model));
19445 this.model = this._parse(node.attributes[this.attr]);
19462 this.model = this._parse(this.text.join(''));
19522 value: function render(xmlStream, model) {
19524 if (model || this.zero) {
19532 xmlStream.addAttribute(this.attr, model);
19534 xmlStream.writeText(model);
19545 this.model = parseInt(node.attributes[this.attr], 10);
19566 this.model = parseInt(this.text.join('') || 0, 10);
19624 value: function render(xmlStream, model) {
19625 if (model !== undefined) {
19633 xmlStream.addAttribute(this.attr, model);
19635 xmlStream.writeText(model);
19646 this.model = node.attributes[this.attr];
19663 this.model = this.text.join('');
19712 function build(xmlStream, model) {
19713 xmlStream.openNode(model.tag, model.$);
19715 if (model.c) {
19716 model.c.forEach(function (child) {
19721 if (model.t) {
19722 xmlStream.writeText(model.t);
19733 function StaticXform(model) {
19745 _this._model = model;
19840 value: function render(xmlStream, model) {
19842 sb: model.sb || 0,
19843 eb: model.eb || 0
19846 if (model && model.hasOwnProperty('richText') && model.richText) {
19848 model.richText.forEach(function (text) {
19851 } else if (model) {
19852 this.map.t.render(xmlStream, model.text);
19868 this.model = {
19899 var rt = this.model.richText;
19902 rt = this.model.richText = [];
19905 rt.push(this.parser.model);
19910 this.model.text = this.parser.model;
19989 function RichTextXform(model) {
19995 _this.model = model;
20001 value: function render(xmlStream, model) {
20002 model = model || this.model;
20005 if (model.font) {
20006 this.fontXform.render(xmlStream, model.font);
20009 this.textXform.render(xmlStream, model.text);
20022 this.model = {};
20054 this.model.text = this.parser.model;
20059 this.model.font = this.parser.model;
20141 function SharedStringXform(model) {
20147 _this.model = model;
20158 value: function render(xmlStream, model) {
20163 if (model && model.hasOwnProperty('richText') && model.richText) {
20164 if (model.richText.length) {
20165 model.richText.forEach(function (text) {
20171 } else if (model !== undefined && model !== null) {
20172 this.map.t.render(xmlStream, model);
20188 this.model = {};
20216 var rt = this.model.richText;
20219 rt = this.model.richText = [];
20222 rt.push(this.parser.model);
20227 this.model = this.parser.model;
20296 function SharedStringsXform(model) {
20302 _this.model = model || {
20314 return this.model.values[index];
20327 index = this.hash[value] = this.model.values.length;
20328 this.model.values.push(value);
20331 this.model.count++;
20342 index = this.rich[xml] = this.model.values.length;
20343 this.model.values.push(value);
20346 this.model.count++;
20356 value: function render(xmlStream, model) {
20357 model = model || this._values;
20361 count: model.count,
20362 uniqueCount: model.values.length
20365 model.values.forEach(function (sharedString) {
20403 this.model.values.push(this.parser.model);
20404 this.model.count++;
20427 return this.model.values;
20432 return this.model.values.length;
20437 return this.model.count;
20487 value: function render(xmlStream, model) {
20490 if (/^\s|\n|\s$/.test(model)) {
20494 xmlStream.writeText(model);
20674 value: function render(xmlStream, model) {
20686 add('horizontal', validation.horizontal(model.horizontal));
20687 add('vertical', validation.vertical(model.vertical));
20688 add('wrapText', validation.wrapText(model.wrapText) ? '1' : false);
20689 add('shrinkToFit', validation.shrinkToFit(model.shrinkToFit) ? '1' : false);
20690 add('indent', validation.indent(model.indent));
20691 add('textRotation', textRotationXform.toXml(model.textRotation));
20692 add('readingOrder', validation.readingOrder(model.readingOrder));
20704 var model = {};
20709 model[name] = value;
20721 this.model = valid ? model : null;
20799 value: function render(xmlStream, model, defaultColor) {
20800 var color = model && model.color || defaultColor || this.defaultColor;
20803 if (model && model.style) {
20804 xmlStream.addAttribute('style', model.style);
20827 this.model = {
20831 this.model = undefined;
20865 if (this.map.color.model) {
20866 if (!this.model) {
20867 this.model = {};
20870 this.model.color = this.map.color.model;
20919 value: function render(xmlStream, model) {
20920 var color = model.color;
20923 if (model.diagonal && model.diagonal.style) {
20924 if (model.diagonal.up) {
20928 if (model.diagonal.down) {
20934 if (edgeModel && !edgeModel.color && model.color) {
20937 color: model.color
20944 add(model.left, this.map.left);
20945 add(model.right, this.map.right);
20946 add(model.top, this.map.top);
20947 add(model.bottom, this.map.bottom);
20948 add(model.diagonal, this.map.diagonal);
20996 var model = this.model = {};
21004 model[key] = edgeModel;
21008 add('left', this.map.left.model);
21009 add('right', this.map.right.model);
21010 add('top', this.map.top.model);
21011 add('bottom', this.map.bottom.model);
21012 add('diagonal', this.map.diagonal.model, {
21073 value: function render(xmlStream, model) {
21074 if (model) {
21077 if (model.argb) {
21078 xmlStream.addAttribute('rgb', model.argb);
21079 } else if (model.theme !== undefined) {
21080 xmlStream.addAttribute('theme', model.theme);
21082 if (model.tint !== undefined) {
21083 xmlStream.addAttribute('tint', model.tint);
21085 } else if (model.indexed !== undefined) {
21086 xmlStream.addAttribute('indexed', model.indexed);
21102 this.model = {
21106 this.model = {
21111 this.model.tint = parseFloat(node.attributes.tint);
21114 this.model = {
21118 this.model = undefined;
21215 value: function render(xmlStream, model) {
21218 if (model.font) {
21219 this.map.font.render(xmlStream, model.font);
21222 if (model.numFmt) {
21223 this.map.numFmt.render(xmlStream, model.numFmt);
21226 if (model.fill) {
21227 this.map.fill.render(xmlStream, model.fill);
21230 if (model.alignment) {
21231 this.map.alignment.render(xmlStream, model.alignment);
21234 if (model.border) {
21235 this.map.border.render(xmlStream, model.border);
21238 if (model.protection) {
21239 this.map.protection.render(xmlStream, model.protection);
21287 this.model = {
21288 alignment: this.map.alignment.model,
21289 border: this.map.border.model,
21290 fill: this.map.fill.model,
21291 font: this.map.font.model,
21292 numFmt: this.map.numFmt.model,
21293 protection: this.map.protection.model
21361 value: function render(xmlStream, model) {
21363 xmlStream.addAttribute('position', model.position);
21364 this.map.color.render(xmlStream, model.color);
21377 this.model = {
21399 this.model.color = this.parser.model;
21438 value: function render(xmlStream, model) {
21440 xmlStream.addAttribute('patternType', model.pattern);
21442 if (model.fgColor) {
21443 this.map.fgColor.render(xmlStream, model.fgColor);
21446 if (model.bgColor) {
21447 this.map.bgColor.render(xmlStream, model.bgColor);
21462 this.model = {
21491 if (this.parser.model) {
21492 this.model[name] = this.parser.model;
21549 value: function render(xmlStream, model) {
21552 switch (model.gradient) {
21554 xmlStream.addAttribute('degree', model.degree);
21560 if (model.center.left) {
21561 xmlStream.addAttribute('left', model.center.left);
21563 if (model.center.right === undefined) {
21564 xmlStream.addAttribute('right', model.center.left);
21568 if (model.center.right) {
21569 xmlStream.addAttribute('right', model.center.right);
21572 if (model.center.top) {
21573 xmlStream.addAttribute('top', model.center.top);
21575 if (model.center.bottom === undefined) {
21576 xmlStream.addAttribute('bottom', model.center.top);
21580 if (model.center.bottom) {
21581 xmlStream.addAttribute('bottom', model.center.bottom);
21591 model.stops.forEach(function (stopModel) {
21607 var model = this.model = {
21612 model.gradient = 'angle';
21613 model.degree = parseInt(node.attributes.degree, 10);
21615 model.gradient = 'path';
21616 model.center = {
21622 model.center.right = node.attributes.right ? parseFloat(node.attributes.right) : 0;
21626model.center.bottom = node.attributes.bottom ? parseFloat(node.attributes.bottom) : 0;
21654 this.model.stops.push(this.parser.model);
21699 value: function render(xmlStream, model) {
21703 switch (model.type) {
21705 this.map.patternFill.render(xmlStream, model);
21709 this.map.gradientFill.render(xmlStream, model);
21730 this.model = {};
21756 this.model = this.parser.model;
21757 this.model.type = this.parser.name;
21948 value: function render(xmlStream, model) {
21953 map[tag].xform.render(xmlStream, model[defn.prop]);
21973 this.model = {};
21993 if (this.parser.model) {
21994 this.model[item.prop] = this.parser.model;
22089 value: function render(xmlStream, model) {
22091 numFmtId: model.id,
22092 formatCode: model.formatCode
22100 this.model = {
22188 value: function render(xmlStream, model) {
22200 add('locked', validation.boolean(model.locked, true) ? undefined : '0');
22201 add('hidden', validation.boolean(model.hidden, false) ? '1' : undefined);
22213 var model = {
22218 var isSignificant = !model.locked || model.hidden;
22219 this.model = isSignificant ? model : null;
22298 value: function render(xmlStream, model) {
22300 numFmtId: model.numFmtId || 0,
22301 fontId: model.fontId || 0,
22302 fillId: model.fillId || 0,
22303 borderId: model.borderId || 0
22307 xmlStream.addAttribute('xfId', model.xfId || 0);
22310 if (model.numFmtId) {
22314 if (model.fontId) {
22318 if (model.fillId) {
22322 if (model.borderId) {
22326 if (model.alignment) {
22330 if (model.protection) {
22339 if (model.alignment) {
22340 this.map.alignment.render(xmlStream, model.alignment);
22343 if (model.protection) {
22344 this.map.protection.render(xmlStream, model.protection);
22360 this.model = {
22368 this.model.xfId = parseInt(node.attributes.xfId, 10);
22400 this.model.protection = this.parser.model;
22402 this.model.alignment = this.parser.model;
22569 this.model = {
22605 value: function render(xmlStream, model) {
22606 model = model || this.model; //
22614 if (model.numFmts && model.numFmts.length) {
22616 count: model.numFmts.length
22618 model.numFmts.forEach(function (numFmtXml) {
22624 if (!model.fonts.length) {
22638 count: model.fonts.length,
22641 model.fonts.forEach(function (fontXml) {
22646 count: model.fills.length
22648 model.fills.forEach(function (fillXml) {
22653 count: model.borders.length
22655 model.borders.forEach(function (borderXml) {
22667 count: model.styles.length
22669 model.styles.forEach(function (styleXml) {
22675 this.map.numFmts.render(xmlStream, model.numFmts);
22676 this.map.fonts.render(xmlStream, model.fonts);
22677 this.map.fills.render(xmlStream, model.fills);
22678 this.map.borders.render(xmlStream, model.borders);
22686 this.map.cellXfs.render(xmlStream, model.styles);
22690 this.map.dxfs.render(xmlStream, model.dxfs);
22741 this.model = {};
22744 if (xform.model && xform.model.length) {
22745 _this2.model[propName] = xform.model;
22757 model: [],
22761 if (this.model.numFmts) {
22763 this.model.numFmts.forEach(function (numFmt) {
22781 value: function addStyleModel(model, cellType) {
22782 if (!model) {
22787 if (!this.model.fonts.length) {
22801 if (this.weakMap && this.weakMap.has(model)) {
22802 return this.weakMap.get(model);
22808 if (model.numFmt) {
22809 style.numFmtId = this._addNumFmtStr(model.numFmt);
22825 if (model.font) {
22826 style.fontId = this._addFont(model.font);
22829 if (model.border) {
22830 style.borderId = this._addBorder(model.border);
22833 if (model.fill) {
22834 style.fillId = this._addFill(model.fill);
22837 if (model.alignment) {
22838 style.alignment = model.alignment;
22841 if (model.protection) {
22842 style.protection = model.protection;
22848 this.weakMap.set(model, styleId);
22859 var style = this.model.styles[id];
22862 var model = this.index.model[id];
22863 if (model) return model; // build a new model
22865 model = this.index.model[id] = {}; // -------------------------------------------------------
22872 model.numFmt = numFmt;
22881 model[name] = part;
22886 addStyle('font', this.model.fonts, style.fontId);
22887 addStyle('border', this.model.borders, style.borderId);
22888 …addStyle('fill', this.model.fills, style.fillId); // ---------------------------------------------…
22892 model.alignment = style.alignment;
22898 model.protection = style.protection;
22901 return model;
22906 this.model.dxfs.push(style);
22907 return this.model.dxfs.length - 1;
22912 return this.model.dxfs[id];
22923 index = this.index.style[xml] = this.model.styles.length;
22924 this.model.styles.push(xml);
22940 index = this.index.numFmt[formatCode] = NUMFMT_BASE + this.model.numFmts.length;
22945 this.model.numFmts.push(xml);
22957 index = this.index.font[xml] = this.model.fonts.length;
22958 this.model.fonts.push(xml);
22972 index = this.index.border[xml] = this.model.borders.length;
22973 this.model.borders.push(xml);
22987 index = this.index.fill[xml] = this.model.fills.length;
22988 this.model.fills.push(xml);
23076 _this3.model = {
23120 value: function addStyleModel(model, cellType) {
23145 this._dateStyleId = this.model.styles.length;
23146 this.model.styles.push(dateStyle);
23191 function UnderlineXform(model) {
23197 _this.model = model;
23203 value: function render(xmlStream, model) {
23204 model = model || this.model;
23206 if (model === true) {
23209 var attr = UnderlineXform.Attributes[model];
23220 this.model = node.attributes.val || true;
23303 value: function prepare(model) {
23306 model.columns.forEach(function (column, index) {
23314 value: function render(xmlStream, model) {
23318 ref: model.autoFilterRef
23320 model.columns.forEach(function (column) {
23336 this.model = {
23365 this.model.columns.push(this.parser.model);
23432 value: function prepare(model, options) {
23433 model.colId = options.index.toString();
23437 value: function render(xmlStream, model) {
23439 colId: model.colId,
23440 hiddenButton: model.filterButton ? '0' : '1'
23449 this.model = {
23517 value: function prepare(model, options) {
23518 model.id = options.index + 1;
23522 value: function render(xmlStream, model) {
23524 id: model.id.toString(),
23525 name: model.name,
23526 totalsRowLabel: model.totalsRowLabel,
23527 totalsRowFunction: model.totalsRowFunction,
23528 dxfId: model.dxfId
23537 this.model = {
23608 value: function render(xmlStream, model) {
23610 name: model.theme ? model.theme : undefined,
23611 showFirstColumn: model.showFirstColumn ? '1' : '0',
23612 showLastColumn: model.showLastColumn ? '1' : '0',
23613 showRowStripes: model.showRowStripes ? '1' : '0',
23614 showColumnStripes: model.showColumnStripes ? '1' : '0'
23623 this.model = {
23724 value: function prepare(model, options) {
23725 this.map.autoFilter.prepare(model);
23726 this.map.tableColumns.prepare(model.columns, options);
23730 value: function render(xmlStream, model) {
23733 id: model.id,
23734 name: model.name,
23735 displayName: model.displayName || model.name,
23736 ref: model.tableRef,
23737 totalsRowCount: model.totalsRow ? '1' : undefined,
23738 totalsRowShown: model.totalsRow ? undefined : '1',
23739 headerRowCount: model.headerRow ? '1' : '0'
23741 this.map.autoFilter.render(xmlStream, model);
23742 this.map.tableColumns.render(xmlStream, model.columns);
23743 this.map.tableStyleInfo.render(xmlStream, model.style);
23760 this.model = {
23803 this.model.columns = this.map.tableColumns.model;
23805 if (this.map.autoFilter.model) {
23806 this.model.autoFilterRef = this.map.autoFilter.model.autoFilterRef;
23807 this.map.autoFilter.model.columns.forEach(function (column, index) {
23808 _this2.model.columns[index].filterButton = column.filterButton;
23812 this.model.style = this.map.tableStyleInfo.model;
23822 value: function reconcile(model, options) {
23824 model.columns.forEach(function (column) {
24004 value: function reconcile(model, options) {
24009 workbookXform.reconcile(model); // reconcile drawings with their rels
24012 media: model.media,
24013 mediaIndex: model.mediaIndex
24015 Object.keys(model.drawings).forEach(function (name) {
24016 var drawing = model.drawings[name];
24017 var drawingRel = model.drawingRels[name];
24037 styles: model.styles
24039 Object.values(model.tables).forEach(function (table) {
24043 styles: model.styles,
24044 sharedStrings: model.sharedStrings,
24045 media: model.media,
24046 mediaIndex: model.mediaIndex,
24047 date1904: model.properties && model.properties.date1904,
24048 drawings: model.drawings,
24049 comments: model.comments,
24050 tables: model.tables,
24051 vmlDrawings: model.vmlDrawings
24053 model.worksheets.forEach(function (worksheet) {
24054 worksheet.relationships = model.worksheetRels[worksheet.sheetNo];
24058 delete model.worksheetHash;
24059 delete model.worksheetRels;
24060 delete model.globalRels;
24061 delete model.sharedStrings;
24062 delete model.workbookRels;
24063 delete model.sheetDefs;
24064 delete model.styles;
24065 delete model.mediaIndex;
24066 delete model.drawings;
24067 delete model.drawingRels;
24068 delete model.vmlDrawings;
24073 …Generator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(stream, model, sheetNo, options,…
24086 model.worksheetHash[path] = worksheet;
24087 model.worksheets.push(worksheet);
24106 … = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(stream, model, name) {
24118 model.comments["../".concat(name, ".xml")] = comments;
24137 … = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(stream, model, name) {
24149 model.tables["../tables/".concat(name, ".xml")] = table;
24168 …_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(stream, model, sheetNo) {
24180 model.worksheetRels[sheetNo] = relationships;
24199 …_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(entry, model, filename) {
24218 model.mediaIndex[filename] = model.media.length;
24219 model.mediaIndex[name] = model.media.length;
24226 model.media.push(medium);
24252 …2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(entry, model, name) {
24264 model.drawings[name] = drawing;
24283 …2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(entry, model, name) {
24295 model.drawingRels[name] = relationships;
24314 …2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(entry, model, name) {
24326 model.vmlDrawings["../drawings/".concat(name, ".vml")] = vmlDrawing;
24345 … = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(entry, model, name) {
24357 model.themes[name] = stream.read().toString();
24493 …var buffer, model, zip, _i, _Object$values, entry, entryName, stream, content, chunkSize, i, workb…
24505 model = {
24613 model.globalRels = _context12.sent;
24622 model.sheets = workbook.sheets;
24623 model.definedNames = workbook.definedNames;
24624 model.views = workbook.views;
24625 model.properties = workbook.properties;
24626 model.calcProperties = workbook.calcProperties;
24634 model.workbookRels = _context12.sent;
24638 model.sharedStrings = new SharedStringsXform();
24640 return model.sharedStrings.parseStream(stream);
24646 model.styles = new StylesXform();
24648 return model.styles.parseStream(stream);
24660 model.company = appProperties.company;
24661 model.manager = appProperties.manager;
24671 Object.assign(model, coreProperties);
24683 return this._processWorksheetEntry(stream, model, match[1], options, entryName);
24697 return this._processWorksheetRelsEntry(stream, model, match[1]);
24711 return this._processThemeEntry(stream, model, match[1]);
24725 return this._processMediaEntry(stream, model, match[1]);
24739 return this._processDrawingEntry(stream, model, match[1]);
24753 return this._processCommentEntry(stream, model, match[1]);
24767 return this._processTableEntry(stream, model, match[1]);
24781 return this._processDrawingRelsEntry(stream, model, match[1]);
24795 return this._processVmlDrawingEntry(stream, model, match[1]);
24806 this.reconcile(model, options); // apply model
24808 this.workbook.model = model;
24830 …addMedia = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(zip, model) {
24836 return Promise.all(model.media.map( /*#__PURE__*/function () {
24919 value: function addDrawings(zip, model) {
24922 model.worksheets.forEach(function (worksheet) {
24940 value: function addTables(zip, model) {
24942 model.worksheets.forEach(function (worksheet) {
24956 …entTypes = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(zip, model) {
24963 xml = xform.toXml(model);
24985 … _addApp = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16(zip, model) {
24992 xml = xform.toXml(model);
25014 …_addCore = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17(zip, model) {
25021 zip.append(coreXform.toXml(model), {
25042 …ddThemes = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18(zip, model) {
25048 themes = model.themes || {
25117 …bookRels = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20(zip, model) {
25134 if (model.sharedStrings.count) {
25142 model.worksheets.forEach(function (worksheet) {
25173 …dStrings = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee21(zip, model) {
25178 if (model.sharedStrings && model.sharedStrings.count) {
25179 zip.append(model.sharedStrings.xml, {
25201 …ddStyles = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee22(zip, model) {
25207 xml = model.styles.xml;
25232 …Workbook = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee23(zip, model) {
25239 zip.append(xform.toXml(model), {
25260 …rksheets = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee24(zip, model) {
25272 model.worksheets.forEach(function (worksheet) {
25330 value: function prepareModel(model, options) {
25332 model.creator = model.creator || 'ExcelJS';
25333 model.lastModifiedBy = model.lastModifiedBy || 'ExcelJS';
25334 model.created = model.created || new Date();
25335 model.modified = model.modified || new Date();
25336model.useSharedStrings = options.useSharedStrings !== undefined ? options.useSharedStrings : true;
25337model.useStyles = options.useStyles !== undefined ? options.useStyles : true; // Manage the shared…
25339model.sharedStrings = new SharedStringsXform(); // add a style manager to handle cell formats, fon…
25341model.styles = model.useStyles ? new StylesXform(true) : new StylesXform.Mock(); // prepare all of…
25345 workbookXform.prepare(model);
25347 sharedStrings: model.sharedStrings,
25348 styles: model.styles,
25349 date1904: model.properties.date1904,
25351 media: model.media
25353 worksheetOptions.drawings = model.drawings = [];
25354 worksheetOptions.commentRefs = model.commentRefs = [];
25356 model.tables = [];
25357 model.worksheets.forEach(function (worksheet) {
25363 model.tables.push(table);
25372 var model, zip;
25378 model = this.workbook.model;
25381 this.prepareModel(model, options); // render
25384 return this.addContentTypes(zip, model);
25388 return this.addOfficeRels(zip, model);
25392 return this.addWorkbookRels(zip, model);
25396 return this.addWorksheets(zip, model);
25400 return this.addSharedStrings(zip, model);
25404 return this.addDrawings(zip, model);
25408 return this.addTables(zip, model);
25412 return Promise.all([this.addThemes(zip, model), this.addStyles(zip, model)]);
25416 return this.addMedia(zip, model);
25420 return Promise.all([this.addApp(zip, model), this.addCore(zip, model)]);
25424 return this.addWorkbook(zip, model);