Closed kouroshfar closed 3 months ago
I used this code
$excel = \avadim\FastExcelWriter\Excel::create();
$sheet = $excel->sheet();
$richText = new \avadim\FastExcelWriter\RichText();
$richText->addText('ATTENTION!')->setBold();
$richText->addText(' The product is reserved for ');
$richText->addText('5 days')->setUnderline()->setColor('#f00');
//$sheet->writeCell($richText);
$sheet->writeTo('B2', $richText);
//$sheet->writeRow(['plain text', $richText]);
$richText = new \avadim\FastExcelWriter\RichText('<b>ATTENTION!</b> The product is reserved for <u><c="#f00">5 days</c></u>');
$sheet->writeTo('B5', $richText);
$excel->save(__DIR__ . '/rich_text.xlsx');
and got this result
I don't understand what your problem is.
Hi. Thanks for your great library. I have a problem about using rich text as you mentioned on this line of documents (https://github.com/aVadim483/fast-excel-writer/blob/master/docs/03-writing.md#using-rich-text) when i want to have rich text, i have 2 ways to do it my problem is when i put it bold on a word, next words will be bold until a new tag and it's different from what did you do
i tried in both ways and there isn't different on the result. can you help me?