Header and footer
Function Prototype
setHeader(string $value, ?array $options = null): self
setFooter(string $value, ?array $options = null): selfstring $value
array $options
Example
$config = [
'path' => './tests'
];
$fileObject = new \Vtiful\Kernel\Excel($config);
$fileObject = $fileObject->fileName('tutorial.xlsx');
$filePath = $fileObject->header(['name', 'age'])
->data([
['viest', 21],
['wjx', 21]
])
->setHeader('&L&"Arial,Bold"&14Sales Report&R&D')
->setFooter('&CPage &P of &N', ['margin' => 0.4])
->output();Last updated