Hi I have a little problem with this plugin, this is the code that makes an error
Sheet::macro('setPageMargins', function (Sheet $sheet, float $top = 1, float $right = 0.75, float $bottom = 1, float $left = 0.75) {
$sheet->getDelegate()->getPageMargins()->setTop($top);
$sheet->getDelegate()->getPageMargins()->setRight($right);
$sheet->getDelegate()->getPageMargins()->setLeft($left);
$sheet->getDelegate()->getPageMargins()->setBottom($bottom);
});
Here is the error
Argument 1 passed to PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setPageMargins() must be an instance of PhpOffice\PhpSpreadsheet\Worksheet\PageMargins, float given
and I just following this documentation https://phpspreadsheet.readthedocs.io/en/develop/topics/recipes/#page-margins with using maatwebsite\Excel, by the way i'm using Laravel 5.7.
The question is how to set the margin? because I think the documentation is wrong, please help