Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Font Style existed but not visible #1415

Open
responsetech opened this issue Aug 18, 2018 · 0 comments
Open

Font Style existed but not visible #1415

responsetech opened this issue Aug 18, 2018 · 0 comments

Comments

@responsetech
Copy link

Hello,

I have an issue of applying some font style, as you can see the font style existed but it reflected in the attached file. Below is the font style array

$header_style = array(
'borders' => array(
'bottom' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM),
'right' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM),
'left' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM),
'top' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM),
),
'alignment' => array(
'wrap' => true,
'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER,
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
),
'font' => array(
'bold' => true,
'size' => 11,
'name' => 'Arial'
),
'fill' => array(
'type' => PHPExcel_Style_Fill::FILL_SOLID,
'color' => array('rgb' => 'D9D9D9')
),
);

and here is the code to apply the style

foreach ($sheet['styles'] as $style) {
$objPHPExcel->getActiveSheet()->getStyle($style['cell'])->applyFromArray($style['style']);
}
PMF xti1j.xlsx

@responsetech responsetech changed the title Font Style excited but not visible Font Style existed but not visible Aug 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant