From 6b5755af3047848701ed7346c2080607701ddde3 Mon Sep 17 00:00:00 2001 From: Blakjak88 Date: Sun, 7 Aug 2022 11:11:15 +0800 Subject: [PATCH] Update xlsx_producer.cpp show_grid_lines() is default enabled in Excel so attribute should only be written when it is set to false. Added 'if-statement' to check for 'false' before writing attribute. --- source/detail/serialization/xlsx_producer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/detail/serialization/xlsx_producer.cpp b/source/detail/serialization/xlsx_producer.cpp index c834f866..03d564e5 100644 --- a/source/detail/serialization/xlsx_producer.cpp +++ b/source/detail/serialization/xlsx_producer.cpp @@ -2310,7 +2310,10 @@ void xlsx_producer::write_worksheet(const relationship &rel) const auto wb_view = source_.view(); const auto view = ws.view(); - write_attribute("showGridLines", write_bool(view.show_grid_lines())); + if (!view.show_grid_lines()) + { + write_attribute("showGridLines", write_bool(view.show_grid_lines())); + } if ((wb_view.active_tab.is_set() && (ws.id() - 1) == wb_view.active_tab.get()) || (!wb_view.active_tab.is_set() && ws.id() == 1))