class GenericExport implements FromCollection, WithColumnWidths, WithHeadings, WithStyles

Properties

protected array $headers
protected array $original_headers
protected string|null $sheetName
protected Collection $data
protected bool $strip_tags

Methods

__construct(Collection $data, bool $strip_tags = true, string|null $sheetName = null)

Create a new GenericExport instance.

Collection
collection()

No description

string
getExcelColumnName(int $index)

Convert a 1-based column index to an Excel column name (e.g. 1=A, 27=AA).

array
headings()

No description

styles(Worksheet $sheet)

No description

array
columnWidths()

No description

Details

at line 37
__construct(Collection $data, bool $strip_tags = true, string|null $sheetName = null)

Create a new GenericExport instance.

Parameters

Collection $data
bool $strip_tags
string|null $sheetName

at line 49
Collection collection()

No description

Return Value

Collection

at line 67
string getExcelColumnName(int $index)

Convert a 1-based column index to an Excel column name (e.g. 1=A, 27=AA).

Parameters

int $index

Return Value

string

at line 79
array headings()

No description

Return Value

array

at line 89
styles(Worksheet $sheet)

No description

Parameters

Worksheet $sheet

at line 108
array columnWidths()

No description

Return Value

array