diff --git a/src/Spout/Writer/Common/Sheet.php b/src/Spout/Writer/Common/Sheet.php
index 0d8c63b..508d037 100644
--- a/src/Spout/Writer/Common/Sheet.php
+++ b/src/Spout/Writer/Common/Sheet.php
@@ -33,6 +33,9 @@ class Sheet
/** @var string Name of the sheet */
protected $name;
+ /** @var bool isVisible visibility of the sheet */
+ protected $isVisible;
+
/** @var \Box\Spout\Common\Helper\StringHelper */
protected $stringHelper;
@@ -50,6 +53,7 @@ class Sheet
$this->stringHelper = new StringHelper();
$this->setName(self::DEFAULT_SHEET_NAME_PREFIX . ($sheetIndex + 1));
+ $this->setVisibility();
}
/**
@@ -70,6 +74,23 @@ class Sheet
return $this->name;
}
+ /**
+ * @api
+ * @return bool isVisible visibility of the sheet
+ */
+ public function isVisible()
+ {
+ return $this->isVisible;
+ }
+
+ public function setVisibility($visibility = true)
+ {
+ $this->isVisible = $visibility;
+
+ return $this;
+ }
+
+
/**
* Sets the name of the sheet. Note that Excel has some restrictions on the name:
* - it should not be blank
diff --git a/src/Spout/Writer/XLSX/Helper/FileSystemHelper.php b/src/Spout/Writer/XLSX/Helper/FileSystemHelper.php
index 86515f3..7238dcc 100644
--- a/src/Spout/Writer/XLSX/Helper/FileSystemHelper.php
+++ b/src/Spout/Writer/XLSX/Helper/FileSystemHelper.php
@@ -289,8 +289,10 @@ EOD;
/** @var Worksheet $worksheet */
foreach ($worksheets as $worksheet) {
$worksheetName = $worksheet->getExternalSheet()->getName();
+ $worksheetState = ( $worksheet->getExternalSheet()->isVisible() ) ? 'visible' : 'hidden';
+
$worksheetId = $worksheet->getId();
- $workbookXmlFileContents .= '';
+ $workbookXmlFileContents .= '';
}
$workbookXmlFileContents .= <<