PHP_XLSXWriter icon indicating copy to clipboard operation
PHP_XLSXWriter copied to clipboard

how do i set different font color in one cell

Open saltedfishDing opened this issue 2 years ago • 2 comments

i tried this,not work $writer->writeSheetRow($sheet, "<span style='color:#ff0000'>Red Contents</span>Black Contents")

saltedfishDing avatar Sep 28 '23 09:09 saltedfishDing

You need to send color option in an array. Below code will fill with 'RED' color to the 1st column and fill with 'GREEN' to the 2nd column

$writer->writeSheetRow($sheet, $rowData, $row_options = array(array('fill'=>'#FF0000'),array('fill'=>'#00FF00')));

test8git avatar Jul 06 '24 10:07 test8git

您好,我已经收到您的信件,将尽快回复您。

sayid avatar Jul 06 '24 10:07 sayid