mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-25 23:06: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>
|
||||
</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;
|
||||
$richText = $wizard->toRichTextObject($html1);
|
||||
|
||||
@ -100,6 +105,12 @@ $objPHPExcel->getActiveSheet()->getStyle('A2')
|
||||
->getAlignment()
|
||||
->setWrapText(true);
|
||||
|
||||
$objPHPExcel->setActiveSheetIndex(0)
|
||||
->setCellValue('A3', $wizard->toRichTextObject($html3));
|
||||
|
||||
$objPHPExcel->setActiveSheetIndex(0)
|
||||
->setCellValue('A4', $wizard->toRichTextObject($html4));
|
||||
|
||||
|
||||
// Rename worksheet
|
||||
echo date('H:i:s') , " Rename worksheet" , EOL;
|
||||
|
Loading…
Reference in New Issue
Block a user