Laravel-excel: [QUESTION] 0 in cell shows up blank in export

Created on 6 Mar 2019  路  1Comment  路  Source: Maatwebsite/Laravel-Excel

Versions

  • PHP version: 7.2
  • Laravel version: 5.5
  • Package version: 3.1

Description

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?

Additional Information

Related Issues:
https://github.com/Maatwebsite/Laravel-Excel/issues/1566 (2.1)
https://github.com/Maatwebsite/Laravel-Excel/issues/135 (1.0)

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bahmanyaghoobi picture bahmanyaghoobi  路  3Comments

alejandri picture alejandri  路  3Comments

kurianic picture kurianic  路  3Comments

rossjcooper picture rossjcooper  路  3Comments

vandolphreyes picture vandolphreyes  路  3Comments