Fit to pages
Function Prototype
fitToPages(int $width, int $height): selfint $width
int $height
Example
$config = [
'path' => './tests'
];
$fileObject = new \Vtiful\Kernel\Excel($config);
$fileObject = $fileObject->fileName('tutorial.xlsx');
$filePath = $fileObject->header(['name', 'age', 'city', 'email'])
->data([
['viest', 21, 'Beijing', '[email protected]'],
['wjx', 21, 'Shanghai', '[email protected]']
])
->fitToPages(1, 0) // Fit to 1 page wide, unlimited height
->output();Last updated