hai

when converting a data from excel to mysql....how to preserve the new line character and the white space.?

any suggestions?

hai

when converting a data from excel to mysql....how to preserve the new line character and the white space.?

any suggestions?

The newline characters are preserved when you copy and past it into notepad(in the form of boxes) but when you copy it back from notepad to excel the newline characters make the text go down to a whole new row. You may have to do this programmatically with the nl2br() function.

<?php
$file="test.xls";
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=$file");
?>
<table cellpadding="0" cellspacing="0" border="1">
	<tr>
		<td>This is<br />multiline<br />text</td>
		<td>cell two</td>
		<td>This also<br />is multiline<br />text</td>
		<td>cell four</td>
	</tr>
	<tr>
		<td colspan="4" align="center"><b>cell one</b></td>
	</tr>
	<tr>
		<td>cell one</td>
		<td>cell two</td>
		<td>cell three</td>
		<td>cell four</td>
	</tr>
</table>