Posted: Thu Dec 14, 2006 1:00 am
Hi all,
Am facing a small problem, please help me.
Before i wrote the content in .csv format with the delimiter ','
Now am trying to write the content in .xls format . when i tried to write to xls file, the content is coming in the single line.
Can any one help me how to put delimiter for xls file.
Waiting for your replies....
Thanks and regards
MADHU
Am facing a small problem, please help me.
Before i wrote the content in .csv format with the delimiter ','
Now am trying to write the content in .xls format . when i tried to write to xls file, the content is coming in the single line.
Can any one help me how to put delimiter for xls file.
Code: Select all
include("inc.php");
$db = mysql_connect($my_server,$my_user,$my_pass) or die("Unable to connect to MySQL");
mysql_select_db($data_base) or die("failed opening database");
$result = mysql_query("select * from gallery");
$fp = fopen("madhu.xls", "a");
fwrite($fp, "entrydate albumname\n");
while($row = mysql_fetch_array($result)){
fwrite($fp, "$row[albumname] $row[albumname]\n");
}
fclose($fp);Thanks and regards
MADHU