Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HTML string not formatting when copied into sheet
Hello All,
Any help with the following would be greatly appreciated. I've got a two column table in SQLserver - second field contains a long string - this string is HTML code. Lets say there's only one record in the table and the HTML looks like the following: <htmlhelloworld</html If I SELECT * from the table and then right click the contents in SQLserver Results pain, and then paste into a worksheet, it just says helloworld in a cell - with no tags. So I assumed if I moved this info to Excel using ADO in my VBA then it would appear formatted correctly. If I use ADO with code like the following then it just appears as one string in the cell with all the tags visible!! Anyone ever come across this before ? Help much appreciated Jason. '====================== rsExcel.MoveFirst Do Until rsExcel.EOF Excel.ThisWorkbook.Sheets("XXX").Copy Befo=Excel.ThisWorkbook.Sheets("XXX") Excel.ActiveSheet.Name = rsExcel!Game With rsHTML 'Extract and copy the required records .Open "SELECT myHTML" & _ " FROM WHAnalysis.dbo.tb_xxx_jq" & _ " WHERE Game= '" & rsExcel!yyy & "'" Excel.ActiveSheet.Range("C2").CopyFromRecordset rsHTML .Close 'close connection End With rsExcel.MoveNext Loop '====================== |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
When a sheet is copied, i want also that the Sub's whithin this sheet is copied to the new sheet | Excel Programming | |||
Deleting Objects all at once - (copied HTML to excel) | Excel Discussion (Misc queries) | |||
saving website html as string | Excel Programming | |||
fixed string length,even other record is copied | Excel Discussion (Misc queries) |