spreadsheet: set custom row height attribute

Set the custom row height attribute which is required
for Excel to use the row height property.

Fixes #232
This commit is contained in:
Todd 2018-12-24 09:34:58 -06:00
parent 15d7d72c01
commit 29b701ce7b

View File

@ -39,11 +39,13 @@ func (r Row) RowNumber() uint32 {
// SetHeight sets the row height in points.
func (r Row) SetHeight(d measurement.Distance) {
r.x.HtAttr = gooxml.Float64(float64(d))
r.x.CustomHeightAttr = gooxml.Bool(true)
}
// SetHeightAuto sets the row height to be automatically determined.
func (r Row) SetHeightAuto() {
r.x.HtAttr = nil
r.x.CustomHeightAttr = nil
}
// IsHidden returns whether the row is hidden or not.