CREATE Excel File with hyperlinks in PHP
- by Brian
I have the following method to create an Excel file from in PHP starting with a two-dimensional array:
header("Content-Disposition: attachment; filename=ExcelFile.xls");
header("Content-Type: application/vnd.ms-excel");
$Data[] = array('field1', 'field2', 'field3');
$Data[] = array('field1', 'field2', 'field3');
$Data[] = array('field1', 'field2', 'field3');
foreach($Data as $key => $val) {
echo implode("\t", array_values($val)) . "\n";
}
Would it be possible to include a hyperlink to a webpage in this file?