Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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</. Thanks - John |
#2
![]() |
|||
|
|||
![]()
You need to use InsertFunction and then select Hyperlink from the Lookup &
Reference category. Randall Arnold "John-Raritan" wrote: 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</. Thanks - John |
#3
![]() |
|||
|
|||
![]()
I think I did not explain myself clearly.
The cell contains text that has html coding in it to achieve rich formatting. Think email where body is in html. Right now the cell looks ugly, eg <b Hello </b is displayed instead of a bold Hello. I would very much like to just see a bold Hello. If I undestood your suggestion correctly, it is for making some text be a hyperlink. Thanks - John "Randall Arnold" wrote: You need to use InsertFunction and then select Hyperlink from the Lookup & Reference category. Randall Arnold "John-Raritan" wrote: 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</. Thanks - John |
#4
![]() |
|||
|
|||
![]()
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. "John-Raritan" wrote: I think I did not explain myself clearly. The cell contains text that has html coding in it to achieve rich formatting. Think email where body is in html. Right now the cell looks ugly, eg <b Hello </b is displayed instead of a bold Hello. I would very much like to just see a bold Hello. If I undestood your suggestion correctly, it is for making some text be a hyperlink. Thanks - John "Randall Arnold" wrote: You need to use InsertFunction and then select Hyperlink from the Lookup & Reference category. Randall Arnold "John-Raritan" wrote: 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</. Thanks - John |
#5
![]() |
|||
|
|||
![]()
Hi FinRazel,
I didn't know about that PasteSpecial as HTML and it works in Excel 2000. Hi John-Raritan 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. http://groups.google.com/groups?thre...%40tkmsftngp02 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 as HTML. 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 subscripts. http://groups.google.com/group/micro...ca9546cafd5127 Gord Dibben had an example boldfacing and/or coloring characters within a cell Oct 2002 http://groups.google.com/groups?thre...oe% 404ax.com Converting what you have to HTML with my macro might work for you: One way would be to convert the worksheet to HTML see http://www.mvps.org/dmcritchie/excel/xl2html.htm 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 --- HTH, 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. "John-Raritan" wrote: 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. ..... |
#6
![]() |
|||
|
|||
![]()
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. John "David McRitchie" wrote: Hi FinRazel, I didn't know about that PasteSpecial as HTML and it works in Excel 2000. Hi John-Raritan 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. http://groups.google.com/groups?thre...%40tkmsftngp02 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 as HTML. 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 subscripts. http://groups.google.com/group/micro...ca9546cafd5127 Gord Dibben had an example boldfacing and/or coloring characters within a cell Oct 2002 http://groups.google.com/groups?thre...oe% 404ax.com Converting what you have to HTML with my macro might work for you: One way would be to convert the worksheet to HTML see http://www.mvps.org/dmcritchie/excel/xl2html.htm 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 --- HTH, 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. "John-Raritan" wrote: 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. ..... |
#7
![]() |
|||
|
|||
![]()
John, In order to better understand your problem, (and because I don't
usually work with web data) I was using the 'Import External Data' command in the 'Data' menu. To make an example, I imported data from the "MSN MoneyCentral Investor Currency Rates.iqy" This data DID appear HTML formatted on my initial import, so I tried to backward engineer the problem, to see if I could turn the HTML formatting off. There are two ways I found to do this. 1) In the 'External Data Range Properties' box, (Get here by hitting the Properties button before importing) There is a checkbox withing 'Data Formatting and Layout' called 'Preserve Cell Formatting' This box should NOT be checked, otherwise only the text in the cells will show up, not the HTML formatting. 2) If you go to Data-Edit Query-Options (the far right button on the toolbar of the 'Edit Web Query' box) "Full HTML formatting" is the third radio button down. Unfortunately, Even though managed to turn HTML formatting on and off, I never did get the actual HTML tags to show up in the cells, therefore, I don't know if any of this will help you. Happy Hunting. "John-Raritan" wrote: 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. John "David McRitchie" wrote: Hi FinRazel, I didn't know about that PasteSpecial as HTML and it works in Excel 2000. Hi John-Raritan 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. http://groups.google.com/groups?thre...%40tkmsftngp02 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 as HTML. 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 subscripts. http://groups.google.com/group/micro...ca9546cafd5127 Gord Dibben had an example boldfacing and/or coloring characters within a cell Oct 2002 http://groups.google.com/groups?thre...oe% 404ax.com Converting what you have to HTML with my macro might work for you: One way would be to convert the worksheet to HTML see http://www.mvps.org/dmcritchie/excel/xl2html.htm 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 --- HTH, 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. "John-Raritan" wrote: 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. ..... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display contents of a specific cell even if a group of cells is mo | Excel Worksheet Functions | |||
Removing a matching code from another cell | Excel Worksheet Functions | |||
Using other workbooks.. | Excel Worksheet Functions | |||
Possible Lookup Table | Excel Worksheet Functions | |||
have cell display the word balance when a equals the same amount a | Excel Discussion (Misc queries) |