Fix every 16th row (17, 33, ...) having data dropped

This commit is contained in:
Crzyrndm 2018-06-24 10:20:30 +12:00
parent d81555dbae
commit f62e5fe5f7

View File

@ -2409,9 +2409,9 @@ void xlsx_producer::write_worksheet(const relationship &rel)
// See note for CT_Row, span attribute about block optimization // See note for CT_Row, span attribute about block optimization
if (first_row_in_block) if (first_row_in_block)
{ {
first_check_row = first_row; first_check_row = row;
// round up to the next multiple of 16 // round up to the next multiple of 16
last_check_row = (((first_row - 1) / 16) + 1) * 16; last_check_row = ((row / 16) + 1) * 16;
} }
for (auto check_row = first_check_row; check_row <= last_check_row; ++check_row) for (auto check_row = first_check_row; check_row <= last_check_row; ++check_row)