From 2291748a8334083bb087632d566873f96ccd96b2 Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Thu, 14 Jul 2016 23:09:19 +0100 Subject: [PATCH] Fix for multiple worksheets, all with merge cells, in HTML Writer --- src/PhpSpreadsheet/Writer/HTML.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpSpreadsheet/Writer/HTML.php b/src/PhpSpreadsheet/Writer/HTML.php index 44eb5e02..5c87b3a4 100644 --- a/src/PhpSpreadsheet/Writer/HTML.php +++ b/src/PhpSpreadsheet/Writer/HTML.php @@ -405,7 +405,7 @@ class HTML extends BaseWriter implements IWriter } // Ensure that Spans have been calculated? - if (!$this->spansAreCalculated) { + if ($this->sheetIndex !== null || !$this->spansAreCalculated) { $this->calculateSpans(); }