add function to xlsx writer

This commit is contained in:
willkensonh 2018-10-11 16:58:24 +11:00
parent c3d3c5ffbf
commit bbd9f66428

View File

@ -185,4 +185,50 @@ abstract class WriterMultiSheetsAbstract extends WriterAbstract
$this->workbookManager->close($this->filePointer); $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);
}
} }