Open cymn14 opened 4 weeks ago
When setting the font name globally, and then set a bold font style for the header row as an example, the font name is "reset" and has to be set again.
here's my code where that happens:
$excel = Excel::create([$this->sheetName])->setDefaultFont( [Style::FONT_NAME => 'Arial']; ); $sheet = $excel->sheet(); $headerData = $this->getHeaderData(); $sheet->writeHeader(array_keys($headerData))->applyFontStyleBold();
I then have to do this so the header has the default font agian:
$sheet->writeHeader(array_keys($headerData))->applyFontStyleBold()->applyFontName(self::DEFAULT_FONT_NAME);
When setting the font name globally, and then set a bold font style for the header row as an example, the font name is "reset" and has to be set again.
here's my code where that happens:
I then have to do this so the header has the default font agian:
$sheet->writeHeader(array_keys($headerData))->applyFontStyleBold()->applyFontName(self::DEFAULT_FONT_NAME);