laravel 导出excel设置列格式
test_and_debug
2023年12月24日 18:18
收录于文集
共31篇

组件:maatwebsite/excel

类实现一些接口

namespace App\Exports;

use Maatwebsite\Excel\Concerns\FromArray; use Maatwebsite\Excel\Concerns\WithCustomValueBinder; use Maatwebsite\Excel\Concerns\WithHeadings; use Maatwebsite\Excel\Concerns\WithStyles; use PhpOffice\PhpSpreadsheet\Cell\Cell; use PhpOffice\PhpSpreadsheet\Cell\DataType; use PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder; use PhpOffice\PhpSpreadsheet\Style\NumberFormat; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;

class PlatformExport extends DefaultValueBinder implements FromArray, WithHeadings, WithStyles, WithCustomValueBinder

设置列的格式