Cell border

Function Prototype

1
Border(int $borderStyle): \Vtiful\Kernel\Format
Copied!

example

1
$config = [
2
'path' => './tests'
3
];
4
5
$fileObject = new \Vtiful\Kernel\Excel($config);
6
7
$fileObject = $fileObject->fileName('tutorial.xlsx');
8
$fileHandle = $fileObject->getHandle();
9
10
$data = [
11
['viest1', 21, 100, "A"],
12
['viest2', 20, 80, "B"],
13
['viest3', 22, 70, "C"],
14
];
15
16
$format = new \Vtiful\Kernel\Format($fileHandle);
17
18
// Create a border style
19
$borderStyle = $format
20
->border(\Vtiful\Kernel\Format::BORDER_THIN)
21
->toResource();
22
23
$fileObject->header(['name', 'age', 'score', 'level'])
24
->data($data)
25
->setRow('A1', 20, $borderStyle)
26
->output();
Copied!
Last modified 2yr ago
Copy link