mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-26 07:16:03 +03:00
Additional examples for HTML to Rich Text helper (superscript and subscript)
This commit is contained in:
parent
98f4754048
commit
16f2eb63a1
@ -78,6 +78,11 @@ $html2='<p>
|
|||||||
</font>
|
</font>
|
||||||
</p>';
|
</p>';
|
||||||
|
|
||||||
|
$html3='2<sup>3</sup> equals 8';
|
||||||
|
|
||||||
|
$html4='H<sub>2</sub>SO<sub>4</sub> is the chemical formula for Sulphuric acid';
|
||||||
|
|
||||||
|
|
||||||
$wizard = new PHPExcel_Helper_HTML;
|
$wizard = new PHPExcel_Helper_HTML;
|
||||||
$richText = $wizard->toRichTextObject($html1);
|
$richText = $wizard->toRichTextObject($html1);
|
||||||
|
|
||||||
@ -100,6 +105,12 @@ $objPHPExcel->getActiveSheet()->getStyle('A2')
|
|||||||
->getAlignment()
|
->getAlignment()
|
||||||
->setWrapText(true);
|
->setWrapText(true);
|
||||||
|
|
||||||
|
$objPHPExcel->setActiveSheetIndex(0)
|
||||||
|
->setCellValue('A3', $wizard->toRichTextObject($html3));
|
||||||
|
|
||||||
|
$objPHPExcel->setActiveSheetIndex(0)
|
||||||
|
->setCellValue('A4', $wizard->toRichTextObject($html4));
|
||||||
|
|
||||||
|
|
||||||
// Rename worksheet
|
// Rename worksheet
|
||||||
echo date('H:i:s') , " Rename worksheet" , EOL;
|
echo date('H:i:s') , " Rename worksheet" , EOL;
|
||||||
|
Loading…
Reference in New Issue
Block a user