@protobi/exceljs
Version:
Excel Workbook Manager - Temporary fork with pivot table enhancements and bug fixes pending upstream merge
30 lines (24 loc) • 549 B
JavaScript
const BaseXform = require('../base-xform');
class WorkbookPivotCacheXform extends BaseXform {
render(xmlStream, model) {
xmlStream.leafNode('pivotCache', {
cacheId: model.cacheId,
'r:id': model.rId,
});
}
parseOpen(node) {
if (node.name === 'pivotCache') {
this.model = {
cacheId: node.attributes.cacheId,
rId: node.attributes['r:id'],
};
return true;
}
return false;
}
parseText() {}
parseClose() {
return false;
}
}
module.exports = WorkbookPivotCacheXform;