Hi everyone, I have a small problem when exporting mysql into csv format. The export works fine. The problem is, if the mysql table has a carriage return, opening the csv file in excel will display a square box where the carriage return is. Displaying the table on a web page is fine. Thanks for any help. Haig <?php $csv_output = 'column1'; $csv_output .= "\015\012"; $result = mysql_query("select * from table"); while($row = mysql_fetch_array($result)) { $csv_output .= '"'.$row[column1].'"'; $csv_output .= "\015\012"; } header("Content-type: application/vnd.ms-excel"); header("Content-disposition: attachment; filename=" . date("Y-m-d")."_my_report".".csv"); print $csv_output; exit; mysql_close(); }