Provided a setGenerateSheetNavigationBlock(false); option to suppress generation of the sheet navigation block when writing multiple worksheets to HTML

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@60582 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2010-09-08 15:05:26 +00:00
parent e7d6547e56
commit 2718e40b3a
1 changed files with 28 additions and 1 deletions

View File

@ -125,6 +125,13 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
*/
protected $_isPdf = false;
/**
* Generate the Navigation block
*
* @var boolean
*/
private $_generateSheetNavigationBlock = true;
/**
* Create a new PHPExcel_Writer_HTML
*
@ -170,7 +177,7 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
fwrite($fileHandle, $this->generateHTMLHeader(!$this->_useInlineCss));
// Write navigation (tabs)
if (!$this->_isPdf) {
if ((!$this->_isPdf) && ($this->_generateSheetNavigationBlock)) {
fwrite($fileHandle, $this->generateNavigation());
}
@ -250,6 +257,26 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
return $this;
}
/**
* Get sheet index
*
* @return boolean
*/
public function getGenerateSheetNavigationBlock() {
return $this->_generateSheetNavigationBlock;
}
/**
* Set sheet index
*
* @param boolean $pValue Flag indicating whether the sheet navigation block should be generated or not
* @return PHPExcel_Writer_HTML
*/
public function setGenerateSheetNavigationBlock($pValue = true) {
$this->_generateSheetNavigationBlock = (bool) $pValue;
return $this;
}
/**
* Write all sheets (resets sheetIndex to NULL)
*/