@difftim/excelize
Version:
Excel Workbook Manager - Read and Write xlsx and csv Files.
37 lines (36 loc) • 845 B
JavaScript
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;
//# sourceMappingURL=c-grouping-xform.js.map