mrtblt
04-13-2008, 09:58 AM
I am creating a raport for excel, let's say something like the following
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=rapor.xls");
header("Pragma: no-cache");
header("Expires: 0");
echo"MODEL NO\tSET ADEDI\tSET/ADET\tTOPLAM\tSATIS FIYATI\t\n";
$sql = mysql_query("SELECT distinct(code_id) FROM sip_lines");
while($row = mysql_fetch_object($sql))
{
echo"".$row3->cod."\t".$row2->amnt."\t".$row3->set."\t".$row3->set*$row2->amnt."\t".$pret."\t\n"; }
Here, how may i preformat the text or values which appear on the excel table
for instance making background blue for the header of the table
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=rapor.xls");
header("Pragma: no-cache");
header("Expires: 0");
echo"MODEL NO\tSET ADEDI\tSET/ADET\tTOPLAM\tSATIS FIYATI\t\n";
$sql = mysql_query("SELECT distinct(code_id) FROM sip_lines");
while($row = mysql_fetch_object($sql))
{
echo"".$row3->cod."\t".$row2->amnt."\t".$row3->set."\t".$row3->set*$row2->amnt."\t".$pret."\t\n"; }
Here, how may i preformat the text or values which appear on the excel table
for instance making background blue for the header of the table