fix writing frozen panes

This commit is contained in:
Thomas Fussell 2016-09-07 18:48:08 -04:00
parent 764740f089
commit 7310bb5590
2 changed files with 2 additions and 2 deletions

View File

@ -1631,7 +1631,7 @@ void xlsx_producer::write_worksheet(const relationship &rel, pugi::xml_node root
sheet_view_node.append_attribute("tabSelected").set_value("1"); sheet_view_node.append_attribute("tabSelected").set_value("1");
sheet_view_node.append_attribute("workbookViewId").set_value("0"); sheet_view_node.append_attribute("workbookViewId").set_value("0");
if (!view.get_selections().empty()) if (!view.get_selections().empty() && !ws.has_frozen_panes())
{ {
auto selection_node = sheet_view_node.child("selection") ? auto selection_node = sheet_view_node.child("selection") ?
sheet_view_node.child("selection") sheet_view_node.child("selection")

View File

@ -119,7 +119,7 @@ public:
ws.get_cell("A22").set_value("timedelta"); ws.get_cell("A22").set_value("timedelta");
ws.get_cell("B22").set_value(xlnt::timedelta(1, 2, 3, 4, 5)); ws.get_cell("B22").set_value(xlnt::timedelta(1, 2, 3, 4, 5));
//ws.freeze_panes("B2"); ws.freeze_panes("B2");
wb.save("simple.xlsx"); wb.save("simple.xlsx");
} }