A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
OK,
A small update from my side.
I tried this.
HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"; HttpContext.Current.Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", "Dashboard.xls")); HttpContext.Current.Response.Write(@"<?xml version=""1.0""?>");
HttpContext.Current.Response.Write(@"<Workbook xmlns:y=""application/vnd.ms-excel"" xmlns:x=""urn:schemas-microsoft-com:office:excel"" xmlns:ss=""urn:schemas-microsoft-com:office:spreadsheet"" xmlns:html=""http://www.w3.org/TR/REC-html40"">"); HttpContext.Current.Response.Write(@"<Worksheet ss:Name=""Sheet1"">"); HttpContext.Current.Response.Write(@"<Table ss:ExpandedColumnCount=""1"" ss:ExpandedRowCount=""1"" x:FullColumns=""1"" x:FullRows=""1"">"); HttpContext.Current.Response.Write(@"<Row>"); HttpContext.Current.Response.Write(@"<Cell><Data ss:Type=""Number"">1</Data></Cell>"); --- This is working, am getting '1' in a cell //HttpContext.Current.Response.Write(@"<Cell><Data ss:Type=""String"">" + strDigitalClientSummaryFinalContent + "</Data></Cell>"); --- This is not working, am getting complete html tags along with my values. HttpContext.Current.Response.Write(@"</Row>"); HttpContext.Current.Response.Write(@"</Table>"); HttpContext.Current.Response.Write(@"</Worksheet>"); HttpContext.Current.Response.Write(@"</Workbook>");
So now the question how do I display html inside a cell of an excel sheet ? What is the datatype needed ?