0
votes

I know this was discussed before,

[Pasting HTML string with line breaks into a single excel cell

but my excel acts differently. If I enter this code:

<html><b>first line<br/>Second line</html>

I get

enter image description here

But if I add ="mso-data-placement:same-cell;":

<html><b>first line<br style="mso-data-placement:same-cell;" />Second line</html> 

I get

enter image description here

In other words, I get one extra line (two cell spaces) with "<br/>" compared to other posts that I found. Then ="mso-data-placement:same-cell ;" gets rid of one cell space, but I still have second line in the second cell. I want to have both entries in the same cell but a different line, like this:

enter image description here

I have office 2010, because that is all I can have at my work. Is there a solution? Thank you!

1

1 Answers

0
votes

There's a working solution at the link you posted.

This:

<html><table><tr><td>first line<br style="mso-data-placement:same-cell;" />
Second line</td></tr></table></html>

works fine for me: it's rendered in a single cell.