diff --git a/include/xlnt/worksheet/sheet_format_properties.hpp b/include/xlnt/worksheet/sheet_format_properties.hpp index c71eefbe..52e4ceb1 100644 --- a/include/xlnt/worksheet/sheet_format_properties.hpp +++ b/include/xlnt/worksheet/sheet_format_properties.hpp @@ -40,9 +40,9 @@ public: optional base_col_width; /// - /// The default row height + /// The default row height is required /// - optional default_row_height; + double default_row_height = 15.0; /// /// The default column width diff --git a/source/detail/serialization/xlsx_producer.cpp b/source/detail/serialization/xlsx_producer.cpp index ec0d890e..212b0d89 100644 --- a/source/detail/serialization/xlsx_producer.cpp +++ b/source/detail/serialization/xlsx_producer.cpp @@ -2353,11 +2353,9 @@ void xlsx_producer::write_worksheet(const relationship &rel) write_attribute("defaultColWidth", format_properties.default_column_width.get()); } - if (format_properties.default_row_height.is_set()) - { - write_attribute("defaultRowHeight", - format_properties.default_row_height.get()); - } + + write_attribute("defaultRowHeight", + format_properties.default_row_height); if (format_properties.dy_descent.is_set()) {