Added support for cell formats when writing Excel files
This commit is contained in:
1 parent
16a2f91a22
commit
40aecd7b90
6 files changed
+277
-2
No files matched your search
@@ -71,6 +71,12 @@ class Style
|
||||
/** @var bool */
|
||||
private $hasSetBackgroundColor = false;
|
||||
|
||||
/** @var string Format */
|
||||
private $format = null;
|
||||
|
||||
/** @var bool */
|
||||
private $hasSetFormat = false;
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
*/
|
||||
@@ -383,4 +389,34 @@ class Style
|
||||
{
|
||||
return $this->hasSetBackgroundColor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets format
|
||||
* @param string $format
|
||||
* @return Style
|
||||
*/
|
||||
public function setFormat($format)
|
||||
{
|
||||
$this->hasSetFormat = true;
|
||||
$this->format = $format;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFormat()
|
||||
{
|
||||
return $this->format;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return bool Whether format should be applied
|
||||
*/
|
||||
public function shouldApplyFormat()
|
||||
{
|
||||
return $this->hasSetFormat;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user