ايجاد فايل هاي excel آسون تر هست:
کد:<?php $excel = "first \t second \t third \t \n this \t is \t test"; header("Content-type: application/vnd.ms-excel"); header('Content-Disposition: attachment; filename=wht.xls'); header("Content-type: application/octet-stream"); header("Pragma: no-cache"); header("Expires: 0"); echo $excel; ?>
---------- Post added at 12:23 AM ---------- Previous post was at 12:21 AM ----------
البته اگر ميخوايد از شر پيغام هاي مزاحم به خصوص تو آفيس 2007 خلاص بشيد از اين استفاده كنيد:
AppServNetwork - Easy way to create XLS file from PHP
چيزي كه تو كد بالا دادم در واقع يك csv سادست ولي اوني تو لينك هست يك فايل excel درست حسابي :دي