My very first example of rich text
generated from html markup
-
+
This block contains an italicized word;
while this block uses an underline.
-
-I want to eat steakpizza.
+
+I want to eat healthy foodpizza.
';
+$html2='
+
+ 100°C is a hot temperature
+
+
+
+ 10°F is cold
+
+
';
+
$wizard = new PHPExcel_Helper_HTML;
-$richText = $wizard->toRichTextObject($html);
+$richText = $wizard->toRichTextObject($html1);
$objPHPExcel->setActiveSheetIndex(0)
->setCellValue('A1', $richText);
@@ -80,6 +90,16 @@ $objPHPExcel->getActiveSheet()->getStyle('A1')
->getAlignment()
->setWrapText(true);
+$richText = $wizard->toRichTextObject($html2);
+
+$objPHPExcel->setActiveSheetIndex(0)
+ ->setCellValue('A2', $richText);
+
+$objPHPExcel->getActiveSheet()->getRowDimension(1)->setRowHeight(-1);
+$objPHPExcel->getActiveSheet()->getStyle('A2')
+ ->getAlignment()
+ ->setWrapText(true);
+
// Rename worksheet
echo date('H:i:s') , " Rename worksheet" , EOL;