Question

I am importing some data from MS-SQL 2005 into excel sheet (2007) using classic ASP. The code snippet headers are

Response.ContentType = "application/vnd.ms-excel"
Response.Charset = "utf-8"
Response.AddHeader "Content-Disposition","attachment; filename=" & filename & ".xls"

Some fields out of the imported data has HTML contents "", ", "" etc which in turn ms-excel formats as HTML and show me images and other html contents are also formatted while opening excel sheet.

I want excel to treat all html tags as unformatted text.

Your help in this context will be highly appreciated.

Note: I have been through many similar questions but couldn't found any clue to my problem.

Thanks

No correct solution

OTHER TIPS

Did you try replacing the tag's < and > with the html entities, like so?

Replace(Replace(somedata,"<","&lt;"),">","&gt;")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top