FIX: format in excel

This commit is contained in:
Juan Pablo Vial
2022-03-07 22:38:29 -03:00
parent fbce7089a8
commit 517276da1d
2 changed files with 9 additions and 6 deletions

View File

@ -38,6 +38,11 @@ class Informe
$this->spreadsheet->getActiveSheet()->fromArray($this->formatArray($data), null, $start);
return $this;
}
public function formatColumn(string $column)
{
$this->spreadsheet->getActiveSheet()->getStyle("{$column}:{$column}")->setFormatCode('#,##0');
return $this;
}
public function send(string $filename)
{
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');