phpexcel 超链接

  1. 链接到外部
点击'百度' 链接到百度首页 

$sheet->setCellValue('E1',"百度");
$sheet->getCell('E1')->getHyperlink()->setUrl("http://www.baidu.com");
  1. 链接到另一个sheet
点击'附件' 链接到name为'attachement'的sheet 的A1单元格 

$sheet->setCellValue('E1',"附件");
$sheet->getCell('E1')->getHyperlink()->setUrl("sheet://attachement!A1");

猜你喜欢

转载自blog.csdn.net/qq_39647045/article/details/82385718
今日推荐