bug in italic or error mine?

Jan 17, 2008 at 8:29 PM
Hi

look this code:
...
$objPHPExcel->getActiveSheet()->setCellValue('A15', 'Inspección por variables' );
$objPHPExcel->getActiveSheet()->setCellValue('A16', 'PMI #' );
$objPHPExcel->getActiveSheet()->setCellValue('B16', 'Parámetros' );
$objPHPExcel->getActiveSheet()->setCellValue('D16', 'Unidad' );
$objPHPExcel->getActiveSheet()->setCellValue('E16', 'n' );
$objPHPExcel->getActiveSheet()->setCellValue('F16', 'Promedio' );
$objPHPExcel->getActiveSheet()->setCellValue('G16', 'DesvioSTD' );
$objPHPExcel->getActiveSheet()->setCellValue('H16', 'Ok/Nok' );

$objPHPExcel->getActiveSheet()->duplicateStyleArray(
array(
'alignment' => array(
'horizontal' => PHPExcelStyleAlignment::HORIZONTAL_CENTER,
),
'font' => array(
'name' => 'Arial',
'italic' => true,
'size' => 8
)
),
'A16:H16'
);

$objPHPExcel->getActiveSheet()->getStyle('A15')->applyFromArray(
array(
'font' => array(
'bold' => true,
'size' => 8,
'name' => 'Arial'
)
)
);
...

look good right?

This piece of code is used without more complex php code, except, create and write the xlsx file
But the A15 cell, is shown in ITALIC and not in BOLD.
More: If I change the order of two blocks of styles, now, all texts are BOLD and not ITALIC

What's wrong?

Thanks
Coordinator
Jan 21, 2008 at 5:00 PM
Seems to be a bug... Will create a fix for this ASAP!
Coordinator
Jan 21, 2008 at 5:03 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jan 22, 2008 at 8:21 PM
Oooops.....It's my first bug found in my life.....in external project !!!! because in my projects there are 1000's.
Coordinator
Jan 23, 2008 at 5:38 AM
Finding bugs is good! So if you find another one, please let us know :-)