Mohammad Awni Ali
Mohammad Awni Ali

Reputation: 115

Adding more than one hyperlink in same Excel Cell using phpspreadsheet?

I want to have more than one hyperlink in same excel cell using phpspreadsheet

Column1    Column2
___________________

Cell1      Link1
___________________
Cell2      Link1
           Link2
           Link3
___________________

I tried write it as following

$sheet->setCellValueByColumnAndRow(28, $i,"=HYPERLINK('http://www.google.co.uk','GOOGLE')&CHAR(10)&HYPERLINK('http://www.amazon.co.uk','AMAZON')");

but the generated excel file isn't readable by excel, I know how to put only one hyperlink using

$sheet->setCellValue('1'.'1', 'Showfile');
$sheet->getCell('A'.1)->getHyperlink()->setUrl('http://localhost/upload/'.$strFile);

Upvotes: 0

Views: 8760

Answers (1)

Related Questions