我想要做的是当匹配值时更改字体粗细。
这是我的代码
$objWorksheet = $objPHPExcel->getActiveSheet();
foreach ($objWorksheet->getRowIterator() as $row) {
$cellIterator = $row->getCellIterator();
foreach ($cellIterator as $cell) {
$value = $cell->getValue();
if( 'Total Order Value' == $value){
$objPHPExcel->getActiveSheet()->getStyle( $cell )->applyFromArray(
array(
'font' => array(
'bold' => true
)
)
);
} else {
//what you want to happen, if it is false
}
}
}