html - white-space: pre; ignored/inconsistent inside <td> in export to (save as) .xls -


consider following, in browser:

<tr>    <td><pre>my  ex       tra   whitespace    preserved</pre></td> </tr> <tr>    <td style="white-space: pre;">my  ex       tra   whitespace    preserved</td> </tr> 

but in excel, when open above .html file, whitespaces removed unless use <pre>

this problem because 1 table i'm exporting has 50 columns , ~2000 rows. not balloons size of file (which fine), causes excel crash.

inconsistency

i used pre tags wrap tds this:

<tr>     <pre>     <td>my  ex       tra   whitespace    preserved</td>     <td>my  ex       tra   whitespace    preserved</td>     <td>my  ex       tra   whitespace    preserved</td>     </pre> </tr> 

it worked fine. used on 2000 line html table 6 columns.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -