I am working in core PHP. I need to make header text in bold format and remains normal text format. The .xls file will be export from PHP.
I am not using any plug-in in my project. I need to complete this without using any plug-in. But i unable to solve this.
My code as follows,
//header part cration
while($r=mysql_fetch_array($exe))
{
//need to set bold. But it is not working. it giving error
//$header .= "<b>".$r['question']."</b>"."\t ";
$header .=.$r['question']."\t ";
}
//body part cration
while($r=mysql_fetch_array($exe))
{
$data .= $r['answer']."\t ";
//code continuous...
}
and Exporting code as follows,
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=reports.xls");
header("Pragma: no-cache");
header("Expires: 0");
print "$header\n\n$data";
Exporting file working fine. But i unable to make headers are bold.
Please any help much be appreciated.