UNPKG

exceljs

Version:

Excel Workbook Manager - Read and Write xlsx and csv Files.

43 lines (41 loc) 970 B
"use strict"; const BaseXform = require('../base-xform'); class TableColumnXform extends BaseXform { get tag() { return 'tableColumn'; } prepare(model, options) { model.id = options.index + 1; } render(xmlStream, model) { xmlStream.leafNode(this.tag, { id: model.id.toString(), name: model.name, totalsRowLabel: model.totalsRowLabel, totalsRowFunction: model.totalsRowFunction, dxfId: model.dxfId }); return true; } parseOpen(node) { if (node.name === this.tag) { const { attributes } = node; this.model = { name: attributes.name, totalsRowLabel: attributes.totalsRowLabel, totalsRowFunction: attributes.totalsRowFunction, dxfId: attributes.dxfId }; return true; } return false; } parseText() {} parseClose() { return false; } } module.exports = TableColumnXform; //# sourceMappingURL=table-column-xform.js.map