diff --git a/src/PhpSpreadsheet/Writer/Html.php b/src/PhpSpreadsheet/Writer/Html.php
index f46905ec..8cd026d3 100644
--- a/src/PhpSpreadsheet/Writer/Html.php
+++ b/src/PhpSpreadsheet/Writer/Html.php
@@ -344,11 +344,6 @@ class Html extends BaseWriter
*/
public function generateHTMLHeader($pIncludeStyles = false)
{
- // Spreadsheet object known?
- if ($this->spreadsheet === null) {
- throw new WriterException('Internal Spreadsheet object not set to an instance of an object.');
- }
-
// Construct HTML
$properties = $this->spreadsheet->getProperties();
$html = '' . PHP_EOL;
@@ -404,11 +399,6 @@ class Html extends BaseWriter
*/
public function generateSheetData()
{
- // Spreadsheet object known?
- if ($this->spreadsheet === null) {
- throw new WriterException('Internal Spreadsheet object not set to an instance of an object.');
- }
-
// Ensure that Spans have been calculated?
if ($this->sheetIndex !== null || !$this->spansAreCalculated) {
$this->calculateSpans();
@@ -525,11 +515,6 @@ class Html extends BaseWriter
*/
public function generateNavigation()
{
- // Spreadsheet object known?
- if ($this->spreadsheet === null) {
- throw new WriterException('Internal Spreadsheet object not set to an instance of an object.');
- }
-
// Fetch sheets
$sheets = [];
if ($this->sheetIndex === null) {
@@ -756,11 +741,6 @@ class Html extends BaseWriter
*/
public function generateStyles($generateSurroundingHTML = true)
{
- // Spreadsheet object known?
- if ($this->spreadsheet === null) {
- throw new WriterException('Internal Spreadsheet object not set to an instance of an object.');
- }
-
// Build CSS
$css = $this->buildCSS($generateSurroundingHTML);
@@ -800,11 +780,6 @@ class Html extends BaseWriter
*/
public function buildCSS($generateSurroundingHTML = true)
{
- // Spreadsheet object known?
- if ($this->spreadsheet === null) {
- throw new WriterException('Internal Spreadsheet object not set to an instance of an object.');
- }
-
// Cached?
if ($this->cssStyles !== null) {
return $this->cssStyles;