J
J
JohnDaniels2016-03-10 09:32:05
PHP
JohnDaniels, 2016-03-10 09:32:05

How to write underlined text in xls?

I use PHPExcel, I need to do this:
7754f0240c2149629a76b46ebed779ca.png
tags naturally do not work. the design of the cells is not suitable, because the text is in one.
what to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2016-03-10
@miraage

First mergeCells, then getStyles("a23:m23")-> and assign an underline. There is an answer
on SO - it might work.

$objRichText = new PHPExcel_RichText();
$objRichText->createText('This text is ');

$objBold = $objRichText->createTextRun('bold');
$objBold->getFont()->setBold(true);

$objRichText->createText(' within the cell.');

$objPHPExcel->getActiveSheet()->getCell('A18')->setValue($objRichText);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question