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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Strange behaviour 2
HTML files into Excel 5
Generating a excel document 1
Carriage Return from HTML file 2
Inserting chr(10) from script 2
Text boxes in forms 1
New line vs line break 2
HTML for Excel Question 1

Back
Top