opening html in excel

  • Thread starter Thread starter rodchar
  • Start date Start date
R

rodchar

hey all,
is there a way in html to get the equivalent of an alt-enter in a cell that
acts as a carriage return within the cell. If i use the <br/> tag a new cell
in excel is generated and i don't want that?

thanks,
rodchar
 
this will put a test on a second line. But you need to have auto fit on or
set your row height to accomodate the number of lines you intend to use.
Otherwise, everything after the first line disappears.

Range("A1") = "This is" & vbLf & "a test"
 
Can you provide more context ?
How is the HTML being generated and is it only for use in XL ?

Tim
 
This might help you. For further hints try saving a small Excel file to
html and check out the source to that file.

**********************************************
<HTML>
<head>
<style type='text/css'>
tr {mso-height-source:auto;}
col {mso-width-source:auto;}
br {mso-data-placement:same-cell;}
</style>
</head>

<body>
<span style='white-space: normal'>Hello<br>There</span>
</body>
</HTML>
**********************************************

Tim
 
we're manually generating small html table (3 rows 2 cols) and then letting
excel open it from there.
 
Back
Top