Skip to content

Commit 839c7f5

Browse files
authored
Merge pull request #855 from autukill/master
Fix defaultRowHeight not working
2 parents 59f1cc5 + 05da937 commit 839c7f5

File tree

8 files changed

+10
-9
lines changed

8 files changed

+10
-9
lines changed

lib/xlsx/xform/sheet/sheet-format-properties-xform.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class SheetFormatPropertiesXform extends BaseXform {
1313
outlineLevelRow: model.outlineLevelRow,
1414
outlineLevelCol: model.outlineLevelCol,
1515
'x14ac:dyDescent': model.dyDescent,
16+
customHeight: model.defaultRowHeight === 0 ? '0' : '1',
1617
};
1718
if (_.some(attributes, value => value !== undefined)) {
1819
xmlStream.leafNode('sheetFormatPr', attributes);

spec/unit/xlsx/xform/sheet/data/sheet.1.2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<sheetViews>
55
<sheetView workbookViewId="0"/>
66
</sheetViews>
7-
<sheetFormatPr defaultRowHeight="15" x14ac:dyDescent="0.25"/>
7+
<sheetFormatPr defaultRowHeight="15" customHeight="1" x14ac:dyDescent="0.25"/>
88
<sheetPr>
99
<tabColor rgb="FF00FF00"/>
1010
<pageSetUpPr fitToPage="1"/>

spec/unit/xlsx/xform/sheet/data/sheet.2.2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<sheetViews>
55
<sheetView workbookViewId="0"/>
66
</sheetViews>
7-
<sheetFormatPr defaultRowHeight="14.4" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
7+
<sheetFormatPr defaultRowHeight="14.4" customHeight="1" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
88
<sheetData>
99
<row r="1" spans="1:3" x14ac:dyDescent="0.25">
1010
<c r="A1" t="s">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
33
<dimension ref="A1:A1"/>
4-
<sheetFormatPr defaultRowHeight="14.4" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
4+
<sheetFormatPr defaultRowHeight="14.4" customHeight="1" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
55
<sheetData/>
66
</worksheet>

spec/unit/xlsx/xform/sheet/data/sheet.5.2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
33
<dimension ref="A1:B1"/>
4-
<sheetFormatPr defaultRowHeight="14.4" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
4+
<sheetFormatPr defaultRowHeight="14.4" customHeight="1" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
55
<sheetData>
66
<row r="1" spans="1:3" x14ac:dyDescent="0.25">
77
<c r="A1">

spec/unit/xlsx/xform/sheet/data/sheet.6.2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
33
<dimension ref="A1:B1"/>
4-
<sheetFormatPr defaultRowHeight="14.4" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
4+
<sheetFormatPr defaultRowHeight="14.4" customHeight="1" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
55
<sheetData>
66
<row r="1" spans="1:2" x14ac:dyDescent="0.25">
77
<c r="A1">

spec/unit/xlsx/xform/sheet/data/sheet.7.2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<sheetViews>
55
<sheetView workbookViewId="0"/>
66
</sheetViews>
7-
<sheetFormatPr defaultRowHeight="14.4" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
7+
<sheetFormatPr defaultRowHeight="14.4" customHeight="1" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
88
<sheetData>
99
<row r="1" spans="1:3" x14ac:dyDescent="0.25">
1010
<c r="A1" t="s">

spec/unit/xlsx/xform/sheet/sheet-format-properties-xform.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const expectations = [
1616
outlineLevelCol: 2,
1717
},
1818
xml:
19-
'<sheetFormatPr defaultRowHeight="14.4" outlineLevelRow="5" outlineLevelCol="2" x14ac:dyDescent="0.55"/>',
19+
'<sheetFormatPr defaultRowHeight="14.4" customHeight="1" outlineLevelRow="5" outlineLevelCol="2" x14ac:dyDescent="0.55"/>',
2020
parsedModel: {
2121
defaultRowHeight: 14.4,
2222
dyDescent: 0.55,
@@ -30,8 +30,8 @@ const expectations = [
3030
create() {
3131
return new SheetFormatPropertiesXform();
3232
},
33-
preparedModel: { defaultRowHeight: 14.4, dyDescent: 0.55 },
34-
xml: '<sheetFormatPr defaultRowHeight="14.4" x14ac:dyDescent="0.55"/>',
33+
preparedModel: {defaultRowHeight: 14.4, dyDescent: 0.55},
34+
xml: '<sheetFormatPr defaultRowHeight="14.4" customHeight="1" x14ac:dyDescent="0.55"/>',
3535
parsedModel: {
3636
defaultRowHeight: 14.4,
3737
dyDescent: 0.55,

0 commit comments

Comments
 (0)