CREATE Excel File with hyperlinks in PHP
Posted
by Brian
on Stack Overflow
See other posts from Stack Overflow
or by Brian
Published on 2010-03-24T06:50:16Z
Indexed on
2010/03/24
6:53 UTC
Read the original article
Hit count: 223
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?
© Stack Overflow or respective owner