$objPHPExcel->setActiveSheetIndex($i)->getCell('A' . $j)
->getHyperlink('mytext')
->setUrl('http://abc.com');
i am trying to link a specific part of text in cell, but its linking to a whole cell, is there any solution to do it? OR if i do it with multiple cells, is there any way to apply width of specific row in a sheet? e.g.
ROW1 CELL1 CELL2 CELL3 CELL4
ROW2 ----CELL1----CELL2----
ROW3 ----CELL1----CELL2----
ROW4 ----CELL1----CELL2----
Can be achieved by using below code.
$objPHPExcel->setActiveSheetIndex($i)->SetCellValue(A1, 'mytext');
$objPHPExcel->setActiveSheetIndex($i)->getCell(A1)->getHyperlink()->setUrl('http://abc.co');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With