@@ -49,18 +49,17 @@ export class ModifyTable {
4949 ) ;
5050
5151 this . data . body . forEach ( ( row : TableRow , r : number ) => {
52- this . table . modify ( {
53- 'a16:rowId' : {
54- index : r ,
55- modify : ModifyXmlHelper . attribute ( 'val' , r ) ,
56- } ,
57- } ) ;
58-
5952 row . values . forEach ( ( cell , c : number ) => {
6053 const rowStyles = row . styles && row . styles [ c ] ? row . styles [ c ] : { } ;
6154 this . table . modify (
6255 this . row ( r , this . column ( c , this . cell ( cell , rowStyles ) ) ) ,
6356 ) ;
57+ this . table . modify ( {
58+ 'a16:rowId' : {
59+ index : r ,
60+ modify : ModifyXmlHelper . attribute ( 'val' , r ) ,
61+ } ,
62+ } ) ;
6463 if ( ! alreadyExpanded ) {
6564 this . expandOtherMergedCellsInColumn ( c , r ) ;
6665 }
@@ -119,33 +118,33 @@ export class ModifyTable {
119118 column = ( index : number , children : ModificationTags ) : ModificationTags => {
120119 return {
121120 'a:tc' : {
122- children : {
123- 'a:txBody' : {
124- index : index ,
125- children : children ,
126- fromPrevious : true ,
127- } ,
128- } ,
121+ index : index ,
122+ children : children ,
123+ fromPrevious : true ,
129124 } ,
130125 } ;
131126 } ;
132127
133128 cell = ( value : number | string , style ?: TableRowStyle ) : ModificationTags => {
134129 return {
135- 'a:t' : {
136- modify : ModifyTextHelper . content ( value ) ,
137- } ,
138- 'a:rPr' : {
139- modify : ModifyTextHelper . style ( style ) ,
130+ 'a:txBody' : {
131+ children : {
132+ 'a:t' : {
133+ modify : ModifyTextHelper . content ( value ) ,
134+ } ,
135+ 'a:rPr' : {
136+ modify : ModifyTextHelper . style ( style ) ,
137+ } ,
138+ 'a:r' : {
139+ collection : ( collection : HTMLCollectionOf < Element > ) => {
140+ XmlHelper . sliceCollection ( collection , 1 ) ;
141+ } ,
142+ } ,
143+ } ,
140144 } ,
141145 'a:tcPr' : {
142146 ...this . setCellStyle ( style ) ,
143147 } ,
144- 'a:r' : {
145- collection : ( collection : HTMLCollectionOf < Element > ) => {
146- XmlHelper . sliceCollection ( collection , 1 ) ;
147- } ,
148- } ,
149148 } ;
150149 } ;
151150
0 commit comments