diff --git a/Classes/PHPExcel/Calculation/LookupRef.php b/Classes/PHPExcel/Calculation/LookupRef.php index d860551..1fe7790 100644 --- a/Classes/PHPExcel/Calculation/LookupRef.php +++ b/Classes/PHPExcel/Calculation/LookupRef.php @@ -281,6 +281,7 @@ class PHPExcel_Calculation_LookupRef } $pCell->getHyperlink()->setUrl($linkURL); + $pCell->getHyperlink()->setTooltip($displayName); return $displayName; } diff --git a/Examples/02types.php b/Examples/02types.php index 6ac11c7..394a73d 100644 --- a/Examples/02types.php +++ b/Examples/02types.php @@ -136,6 +136,27 @@ $objPHPExcel->getActiveSheet()->getStyle("C14")->getAlignment()->setWrapText(tru $objPHPExcel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true); $objPHPExcel->getActiveSheet()->getColumnDimension('C')->setAutoSize(true); +$objRichText3 = new PHPExcel_RichText(); +$objRichText3->createText("Hello "); + +$objUnderlined = $objRichText3->createTextRun("underlined"); +$objUnderlined->getFont()->setUnderline(true); +$objRichText3->createText(' World.'); + +$objPHPExcel->getActiveSheet() + ->getCell("C15") + ->setValue($objRichText3); + + +$objPHPExcel->getActiveSheet()->setCellValue('A17', 'Hyperlink'); + +$objPHPExcel->getActiveSheet()->setCellValue('C17', 'www.phpexcel.net'); +$objPHPExcel->getActiveSheet()->getCell('C17')->getHyperlink()->setUrl('http://www.phpexcel.net'); +$objPHPExcel->getActiveSheet()->getCell('C17')->getHyperlink()->setTooltip('Navigate to website'); + +$objPHPExcel->getActiveSheet()->setCellValue('C18', '=HYPERLINK("mailto:abc@def.com","abc@def.com")'); + + // Rename worksheet echo date('H:i:s') , " Rename worksheet" , EOL; $objPHPExcel->getActiveSheet()->setTitle('Datatypes');