UNPKG

@difftim/excelize

Version:

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

42 lines (35 loc) 808 B
const BaseXform = require('../../base-xform'); class CGrouping extends BaseXform { get tag() { return 'c:grouping'; } render(xmlStream, model) { xmlStream.leafNode(this.tag, { 'xmlns:r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships', val: model.val, cstate: 'print', }); } parseOpen(node) { switch (node.name) { case this.tag: this.model = { groupType: node.attributes.val === 'clustered' ? '' : node.attributes.val, }; return true; default: return true; } } parseText() {} parseClose(name) { switch (name) { case this.tag: return false; default: // unprocessed internal nodes return true; } } } module.exports = CGrouping;