I am exporting data through a website to an excel file. The resulting table table displays data auto-formatted by excel. There are alphanumeric strings that can get rather long. Some of them are a string of numbers that excel makes into scientific notation. Others are a string with a dash that gets auto-converted to a date. From everything I have tried lately, <pre></pre> has worked best, besides some table formatting issues, which I am asking for help with. A few things that did not work: ~Inserting spaces into the string, around the variable, before, after, before and after -> excel trimmed the whitespace and still auto-converted ~ ,  , and such do work, but then all search form fields have to be set up to filter out this if the user copies and pastes, since the php trim function does not trim those characters. Many, many pages and variables would have to be edited to implement this. ~Type casting the variable to string still resulted in auto-formatting ~Adding a character before or after the string does work, but then the problem with copying and pasting occurs, and the users do not like that extra character there either. ~Single quotes around the php variable does not work, still is auto-formatted ~Adding an apostrophe to the front does not keep the data as a string, though it would if it was directly typed into excel like that - The string is prefixed with a ', which is undesirable. Using <pre></pre>, the data is preserved in the format I prefer. However, the table displays each row on two rows, as if they were merged. Why is this happening? How can this be fixed and still use <pre></pre>? Since many different reports are generated every day by users, I cannot simply go in and resize/reformat the rows for each file. View attachment 42942 code with the <pre></pre> as included below View attachment 42943 what I wish the code result was The code below will replicate the problem if saved in word, and then opened in excel. <table border='1' bordercolor='#000000' cellpadding='3'> <tr> <td align='left' bgcolor='#cccccc' ><strong>#</strong></td> <td align='left' bgcolor='#cccccc'<strong>ID</strong></td> </tr> <tr> <td align='left' valign='top' nowrap><pre> 4-21</pre></td> <td align='left' valign='top' nowrap><pre> 3424150009</pre></td> </tr> </table> Code (markup): Please assist. Thank you.