I am isung PHPExcel and have a URL in a string. When doing:
$url = \'http://dx.doi.org/10.1016/j.phymed.2005.11.003\'
$xls = new PHPExcel();
$xls->setActiveSh
I am guessing your field value has integer value. If it is so, then you first have to convert the data type of that cell and then set the hyperlink. Below is how I have done this.
//set the value of the cell
$this->phpExcelObj->getActiveSheet()->SetCellValue('A1',$id);
//change the data type of the cell
$this->phpExcelObj->getActiveSheet()->getCell("A1")->setDataType(PHPExcel_Cell_DataType::TYPE_STRING2);
///now set the link
$this->phpExcelObj->getActiveSheet()->getCell("A1")->getHyperlink()->setUrl(strip_tags($link));