Add column width options

This commit is contained in:
nartzis committed 2022-01-17 16:35:35 +03:00
1 parent e95e0eeefd
commit 3a0ce0e059
16 files changed
+664 -16

No files matched your search

@@ -157,6 +157,16 @@ abstract class WorkbookManagerAbstract implements WorkbookManagerInterface
return $this->currentWorksheet;
}
/**
* Starts the current sheet and opens the file pointer
*
* @throws IOException
*/
public function startCurrentSheet()
{
$this->worksheetManager->startSheet($this->getCurrentWorksheet());
}
/**
* Sets the given sheet as the current one. New data will be written to this sheet.
* The writing will resume where it stopped (i.e. data won't be truncated).
@@ -276,6 +286,41 @@ abstract class WorkbookManagerAbstract implements WorkbookManagerInterface
}
}
/**
* @param float $width
*/
public function setDefaultColumnWidth(float $width)
{
$this->worksheetManager->setDefaultColumnWidth($width);
}
/**
* @param float $height
*/
public function setDefaultRowHeight(float $height)
{
$this->worksheetManager->setDefaultRowHeight($height);
}
/**
* @param float $width
* @param array $columns One or more columns with this width
*/
public function setColumnWidth(float $width, ...$columns)
{
$this->worksheetManager->setColumnWidth($width, ...$columns);
}
/**
* @param float $width The width to set
* @param int $start First column index of the range
* @param int $end Last column index of the range
*/
public function setColumnWidthForRange(float $width, int $start, int $end)
{
$this->worksheetManager->setColumnWidthForRange($width, $start, $end);
}
/**
* Closes the workbook and all its associated sheets.
* All the necessary files are written to disk and zipped together to create the final file.