Folks - thanks for the replys, I will check them out.
A little more detail on my problem so you can better relate. I am
populating a spreadsheet using ODBC to a sql server database. Some of the
fields being returned have html commands for formatting - nothing fancy, just
bold, underline, ect. So, ideally, I would like the text to show fully
formated. At the minimum, I would need to remove the html formating so the
text would be readable.
"David McRitchie" wrote:
I didn't know about that PasteSpecial as HTML and it works in Excel 2000.
But you have to have copied from HTML not from text like
<bHello World</b <font color="red"I'm <bready</b now.</font
and I think you said he had a lot of them, if not problem is solved; otherwise,.
I can't see anything to copy text to the clipboard and have the clipboard
marked up as having HTML code instead of text so it can be
pasted back into the Excel cell..
This thread was as close as I came to something of possible interest.
and Chip Pearson's http://www.cpearson.com/excel/clipboar.htm
but it is only for copying formulas or text.
Somehow you have to get the HTML text into the Windows clipboard
Before getting carried away though keep in mind that a cell
can only have one link, and if it has a link you will see it all
as one link.
If it is just a matter of boldface then you could convert the strings
with something else that David Hager showed us - this is for
Gord Dibben had an example boldfacing and/or coloring characters within a cell Oct 2002
Converting what you have to HTML with my macro might work for you:
One way would be to convert the worksheet to HTML see
which is a stupid macro and does not recognize most HTML code so it will be
simply transferred. Then copy and paste the generated HTML back to Excel.
You could convert just one column based on your selection then paste the
converted column back to your Excel sheet.
I have no idea if that would be an acceptable solution. But this is the way that
I create most of my tables for my Excel documentation. I just tested it with
your example and (just boldface tags) and it worked fine. Converting only one
column and then copying and pasting back from HTML (using Internet Explorer)
would get you around having to preserve any formulas in the other columns.
BTW, your subject is ambiguous it looks like it means the opposite of what you
are asking for, and I'd have a hard time rephrasing it myself. Perhaps
How to convert HTML formatting tags to format data within Excel
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
"FinRazel" wrote ...
How much data are you talking about? Instead of using Import, could you use
copy/paste? If you can, simply Paste Special and click the HTML radio button.
I am importing data to a cell. The data is actually html code. I would like
to display the data formatted. Right now I get all the ugly html codes, like
<b Hello World</b. .....