Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
tommyrot, this will do what you're asking for:
<html>
<head>
<style>
<!--table
br
{mso-data-placement:same-cell;}
.xl24
{mso-style-parent:style0;white-space:normal;}
-->
</style>
</head>
<table>
<tr>
<td class=xl24>adsf<br><br>asdfasdf<br><br><br>asdf</td>
</tr>
</table>
</html>
I got this from saving an Excel file as htm and then reducing Microsoft's craptacular html code to just these essentials to get it to respect the br tags.
Otherwise, is there way to search an entire Excel document for a certain character (tilde, say) and replace it with a carriage return? In Word you can replace something with ^p for a paragraph (carriage return) or ^l (manual line break) but Excel does not work the same way.
I don't have a copy of excel at home, but I thought for sure there was a character combo that it would read as a line break or carriage return. Is there anything in the help file about line break or formatting characters?
Is there anything in the help file about line break or formatting characters?
We couldn't find anything.
Ok, a few posts up I got the html code that will recognize br tags when importing into Excel.
Thanks, Eddie - we'll give that a try tomorrow.
Eddie, that doesn't work for what we want to do. If we were to save your example as an html file and open it in Excel, we would want all the text to be in a single cell (because it's all in one <td>). But when I try that, it ends up in four cells (two of which are two cells high, so
something
is going on).
Anyway, I gotta run.
tommyrot, have you tried exporting the query from Access as xml and then open that xml file in Excel? It seems to work for me, and I made a table with very long strings and line breaks and it came across cleanly.