@@ -34,6 +34,7 @@ const PictureXform = require('../../xlsx/xform/sheet/picture-xform');
34
34
const ConditionalFormattingsXform = require ( '../../xlsx/xform/sheet/cf/conditional-formattings-xform' ) ;
35
35
const HeaderFooterXform = require ( '../../xlsx/xform/sheet/header-footer-xform' ) ;
36
36
const RowBreaksXform = require ( '../../xlsx/xform/sheet/row-breaks-xform' ) ;
37
+ const ColBreaksXform = require ( '../../xlsx/xform/sheet/col-breaks-xform' ) ;
37
38
38
39
// since prepare and render are functional, we can use singletons
39
40
const xform = {
@@ -52,6 +53,7 @@ const xform = {
52
53
conditionalFormattings : new ConditionalFormattingsXform ( ) ,
53
54
headerFooter : new HeaderFooterXform ( ) ,
54
55
rowBreaks : new RowBreaksXform ( ) ,
56
+ colBreaks : new ColBreaksXform ( ) ,
55
57
} ;
56
58
57
59
// ============================================================================================
@@ -107,6 +109,7 @@ class WorksheetWriter {
107
109
108
110
// keep a record of all row and column pageBreaks
109
111
this . rowBreaks = [ ] ;
112
+ this . colBreaks = [ ] ;
110
113
111
114
// for default row height, outline levels, etc
112
115
this . properties = Object . assign (
@@ -246,6 +249,7 @@ class WorksheetWriter {
246
249
this . _writeBackground ( ) ;
247
250
this . _writeHeaderFooter ( ) ;
248
251
this . _writeRowBreaks ( ) ;
252
+ this . _writeColBreaks ( ) ;
249
253
250
254
// Legacy Data tag for comments
251
255
this . _writeLegacyData ( ) ;
@@ -653,6 +657,10 @@ class WorksheetWriter {
653
657
this . stream . write ( xform . rowBreaks . toXml ( this . rowBreaks ) ) ;
654
658
}
655
659
660
+ _writeColBreaks ( ) {
661
+ this . stream . write ( xform . colBreaks . toXml ( this . colBreaks ) ) ;
662
+ }
663
+
656
664
_writeDataValidations ( ) {
657
665
this . stream . write ( xform . dataValidations . toXml ( this . dataValidations . model ) ) ;
658
666
}
0 commit comments