aVadim483 / fast-excel-writer

Lightweight and very fast XLSX Excel Spreadsheet Writer in PHP
MIT License
142 stars 26 forks source link

Set Default Font is used only for written cells #45

Closed guidobonuzzi closed 6 months ago

guidobonuzzi commented 7 months ago

This is an example:

$excel = Excel::create(
    [
        'test',
    ],
)
    ->setDefaultStyle([Style::FONT => [Style::FONT_NAME => 'Calibri', Style::FONT_SIZE => 11]]);

$sheet = $excel->sheet(1);

$sheet->writeCell('TEST');

The Excel file has the right font only in cell A1, in the rest of the file Arial 10 is used.

If this is intended to guarantee high performance, I still think it is better to change the font from Arial 10 to Calibri 11 which seems to be the current Excel standard.

Thanks

aVadim483 commented 6 months ago

fixed in v4.10.0