Skip to content

Commit

Permalink
fix measure export
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarzin committed Feb 21, 2024
1 parent db68cb9 commit 8cc330b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app/Exports/MeasuresExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;
use Maatwebsite\Excel\Concerns\WithStyles;
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
use \PhpOffice\PhpSpreadsheet\Cell\StringValueBinder;

class MeasuresExport implements FromQuery, WithMapping, WithHeadings, WithStyles, WithColumnWidths
class MeasuresExport
extends StringValueBinder
implements FromQuery, WithMapping, WithHeadings, WithStyles, WithColumnWidths
{
public function headings(): array
{
Expand Down Expand Up @@ -40,6 +44,14 @@ public function styles(Worksheet $sheet)
];
}

public function columnFormats(): array
{
return [
'A' => NumberFormat::FORMAT_TEXT,
'B' => NumberFormat::FORMAT_TEXT,
];
}

public function columnWidths(): array
{
return [
Expand Down

0 comments on commit 8cc330b

Please sign in to comment.