Allow HYPERLINK() function to set the tooltip, and add extra examples of setting hyperlinks either through PHPExcel methods or using the HYPERLINK() function
This commit is contained in:
parent
6db66a0da4
commit
fa98c373df
|
@ -162,6 +162,15 @@ $objPHPExcel->getActiveSheet()
|
||||||
->getAlignment()->setWrapText(true);
|
->getAlignment()->setWrapText(true);
|
||||||
|
|
||||||
|
|
||||||
|
$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")');
|
||||||
|
|
||||||
|
|
||||||
$objPHPExcel->getActiveSheet()
|
$objPHPExcel->getActiveSheet()
|
||||||
->getColumnDimension('B')
|
->getColumnDimension('B')
|
||||||
->setAutoSize(true);
|
->setAutoSize(true);
|
||||||
|
|
|
@ -274,6 +274,7 @@ class LookupRef
|
||||||
}
|
}
|
||||||
|
|
||||||
$pCell->getHyperlink()->setUrl($linkURL);
|
$pCell->getHyperlink()->setUrl($linkURL);
|
||||||
|
$pCell->getHyperlink()->setTooltip($displayName);
|
||||||
|
|
||||||
return $displayName;
|
return $displayName;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue