From bbd9f664289e19a2b3f9298831a83f45f3a2dd83 Mon Sep 17 00:00:00 2001 From: willkensonh Date: Thu, 11 Oct 2018 16:58:24 +1100 Subject: [PATCH] add function to xlsx writer --- .../Writer/WriterMultiSheetsAbstract.php | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/Spout/Writer/WriterMultiSheetsAbstract.php b/src/Spout/Writer/WriterMultiSheetsAbstract.php index 4d7411a..05e3ef6 100644 --- a/src/Spout/Writer/WriterMultiSheetsAbstract.php +++ b/src/Spout/Writer/WriterMultiSheetsAbstract.php @@ -185,4 +185,50 @@ abstract class WriterMultiSheetsAbstract extends WriterAbstract $this->workbookManager->close($this->filePointer); } } + + /** + * @param string $col + * @param float $width + * @throws \Box\Spout\Common\Exception\IOException + */ + public function setColWidth(string $col, float $width) + { + $this->workbookManager->getCurrentWorksheet()->setColWidth($col, $width); + } + + /** + * @param float $width + * @throws \Box\Spout\Common\Exception\IOException + */ + public function setDefaultColWidth(float $width) + { + $this->workbookManager->getCurrentWorksheet()->setDefaultColWidth($width); + } + + /** + * @param float $height + * @throws \Box\Spout\Common\Exception\IOException + */ + public function setDefaultRowHeight(float $height) + { + $this->workbookManager->getCurrentWorksheet()->setDefaultRowHeight($height); + } + + /** + * @param string $leftCell + * @param string $rightCell + */ + public function mergeCells(string $leftCell, string $rightCell) + { + $this->workbookManager->getCurrentWorksheet()->mergeCells($leftCell,$rightCell); + } + + /** + * @param string $leftCell + * @param string $rightCell + */ + public function unMergeCells(string $leftCell, string $rightCell) + { + $this->workbookManager->getCurrentWorksheet()->unMergeCells($leftCell,$rightCell); + } }