Wednesday, May 23, 2012

export data as excel format from php mysql

<?php
$file
="marksreport".$_POST["txtfromdate"].".xls";


header('Content-Type: text/html'); 

header("Content-type: application/x-msexcel"); 

//tried adding  charset='utf-8' into header

header("Content-Disposition: attachment; filename=$file"); ?>


copy and paste into header in page 

export to excel from project

No comments:

Post a Comment

If you Satisfied , Please Leave a comment