I am creating my rows using an array and then returning return collect($rows);
When I set a cell value to 0 and export the .xls or .xlsx file, the cells where the zero was set are empty. This is causing an issue with my calculations
Some pseudo-code for how I am adding the rows
$rows[] = [
'A1' => 0
'A2' => 0
];
return collect($rows);
However, when I open the file, those values are blank instead of 0. Is there any way to include an actual zero instead of a blank cell?
Related Issues:
https://github.com/Maatwebsite/Laravel-Excel/issues/1566 (2.1)
https://github.com/Maatwebsite/Laravel-Excel/issues/135 (1.0)
https://docs.laravel-excel.com/3.1/exports/collection.html#strict-null-comparisons
Most helpful comment
https://docs.laravel-excel.com/3.1/exports/collection.html#strict-null-comparisons