Excel column formatting for exports
This commit is contained in:
		| @@ -4,8 +4,10 @@ namespace App\Exports\Purchases\Sheets; | ||||
|  | ||||
| use App\Abstracts\Export; | ||||
| use App\Models\Banking\Transaction as Model; | ||||
| use Maatwebsite\Excel\Concerns\WithColumnFormatting; | ||||
| use PhpOffice\PhpSpreadsheet\Style\NumberFormat; | ||||
|  | ||||
| class BillTransactions extends Export | ||||
| class BillTransactions extends Export implements WithColumnFormatting | ||||
| { | ||||
|     public function collection() | ||||
|     { | ||||
| @@ -51,4 +53,11 @@ class BillTransactions extends Export | ||||
|             'reconciled', | ||||
|         ]; | ||||
|     } | ||||
|  | ||||
|     public function columnFormats(): array | ||||
|     { | ||||
|         return [ | ||||
|             'B' => NumberFormat::FORMAT_DATE_YYYYMMDD, | ||||
|         ]; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user