How to paste multiline HTML into a single cell in Excel 2003?

K

Ker_01

I have some source HTML code that I need to put in a single cell in Excel
2003 for testing purposes.

I've tried pasting special with all options, no luck. I saved the code
snippet to a .txt file first (to strip formatting) and it still wants to
paste across multiple rows (due to end-of-line symbols, I'm guessing).

I even tried assigning the source to the target cell in VBA, but there are
already lots of quotes in the HTML, plus I don't want to mess up the
end-of-line characters (it is part of what I need to test) so that was
unsuccessful as well.

Is there any (relatively easy) way to paste a block of HTML source into a
single cell? I don't care if the new lines are seperated (like what you
would get by entering [alt-enter] in a cell, or if it all runs on together
in one long wrapped line, as long as the original html source is "intact"
for accurate testing.

Thanks for any advice,
Keith
 
D

Dave Peterson

Try pasting into the formulabar.

Ker_01 said:
I have some source HTML code that I need to put in a single cell in Excel
2003 for testing purposes.

I've tried pasting special with all options, no luck. I saved the code
snippet to a .txt file first (to strip formatting) and it still wants to
paste across multiple rows (due to end-of-line symbols, I'm guessing).

I even tried assigning the source to the target cell in VBA, but there are
already lots of quotes in the HTML, plus I don't want to mess up the
end-of-line characters (it is part of what I need to test) so that was
unsuccessful as well.

Is there any (relatively easy) way to paste a block of HTML source into a
single cell? I don't care if the new lines are seperated (like what you
would get by entering [alt-enter] in a cell, or if it all runs on together
in one long wrapped line, as long as the original html source is "intact"
for accurate testing.

Thanks for any advice,
Keith
 
K

Ker_01

Thanks Dave! That worked perfectly. Now I'm going to go sulk for having
wasted so much time and completely missing such a simple solution... <g>

Thanks again,
Keith

Dave Peterson said:
Try pasting into the formulabar.

Ker_01 said:
I have some source HTML code that I need to put in a single cell in Excel
2003 for testing purposes.

I've tried pasting special with all options, no luck. I saved the code
snippet to a .txt file first (to strip formatting) and it still wants to
paste across multiple rows (due to end-of-line symbols, I'm guessing).

I even tried assigning the source to the target cell in VBA, but there
are
already lots of quotes in the HTML, plus I don't want to mess up the
end-of-line characters (it is part of what I need to test) so that was
unsuccessful as well.

Is there any (relatively easy) way to paste a block of HTML source into a
single cell? I don't care if the new lines are seperated (like what you
would get by entering [alt-enter] in a cell, or if it all runs on
together
in one long wrapped line, as long as the original html source is "intact"
for accurate testing.

Thanks for any advice,
Keith
 

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

Top