This repository was archived by the owner on May 26, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 639
/
Copy pathWorksheetManagerInterface.php
64 lines (55 loc) · 1.8 KB
/
WorksheetManagerInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
namespace Box\Spout\Writer\Common\Manager;
use Box\Spout\Common\Entity\Row;
use Box\Spout\Writer\Common\Entity\Worksheet;
/**
* Interface WorksheetManagerInterface
* Inteface for worksheet managers, providing the generic interfaces to work with worksheets.
*/
interface WorksheetManagerInterface
{
/**
* @param float|null $width
*/
public function setDefaultColumnWidth($width);
/**
* @param float|null $height
*/
public function setDefaultRowHeight($height);
/**
* @param float $width
* @param array $columns One or more columns with this width
*/
public function setColumnWidth(float $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);
/**
* Adds a row to the worksheet.
*
* @param Worksheet $worksheet The worksheet to add the row to
* @param Row $row The row to be added
* @throws \Box\Spout\Common\Exception\IOException If the data cannot be written
* @throws \Box\Spout\Common\Exception\InvalidArgumentException If a cell value's type is not supported
* @return void
*/
public function addRow(Worksheet $worksheet, Row $row);
/**
* Prepares the worksheet to accept data
*
* @param Worksheet $worksheet The worksheet to start
* @throws \Box\Spout\Common\Exception\IOException If the sheet data file cannot be opened for writing
* @return void
*/
public function startSheet(Worksheet $worksheet);
/**
* Closes the worksheet
*
* @param Worksheet $worksheet
* @return void
*/
public function close(Worksheet $worksheet);
}