Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do i set different font color in one cell #350

Open
saltedfishDing opened this issue Sep 28, 2023 · 2 comments
Open

how do i set different font color in one cell #350

saltedfishDing opened this issue Sep 28, 2023 · 2 comments

Comments

@saltedfishDing
Copy link

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

@test8git
Copy link

test8git commented Jul 6, 2024

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')));

@sayid
Copy link

sayid commented Jul 6, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants