Hi,
I've a script that generates excel file.
I am using this code:
header("Content-type: application/x-msdownload");
header("Content-Disposition: attachment; filename=doctor_list.xls");
header("Pragma: no-cache");
header("Expires: 0");
no to generate the excel I do something like this:
$line = "$Title \t $Name \t $Address \t $City\t $Postcode \n
print "$line";
it works fine but if $Address has a breaking line it breakes my excel. I tried to remove the /n by using
$Address = ereg_replace ("\n", " ",$Address");
but it doesn't work. Any idea?
thanks!