我正在尝试使用phpExcel将MySQL数据库导出到excel表。我想在多个单元格上设置超链接。我搜索了很多解决方案但几乎关于单细胞。谁能帮助我? 非常感谢你
<?php
//... your php file
//json
$output = json_encode( $yourDataStructure );
$contentType = 'application/json';
//optional jsonp output
if(!empty( $_GET['callback'] )){
$contentType = 'application/javascript';
$output = $_GET['callback'] . '(' . $output . ')';
}
//setting the correct Content-Type
//and will throw if you already started sending something besides
header('Content-Type: ' . $contentType);
//ensure that this is the last/only thing that is sent to the client
exit( $output );
?>