Datagrid --> Excel Spreadsheet - A "small detail" question
In a VB.NET application, I have a datagrid that I export to an Excel
spreadsheet like this:
' Set the content type to Excel
Response.ContentType = "application/vnd.ms-excel"
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
' Get the HTML for the control.
' Write the HTML back to the browser.
In the datagrid, I use colored backgrounds. There is a default white
background, and four other colors that I use. After exporting, the
spreadsheet only retains the white background and one of the other colors
(System.Drawing.Color.FromName("#e38a00"). The other three colors (nothing
special - ff0000, 00ff00, ffff00 - red, green, and yellow) are lost in the
Now, my questions:
- Am I supposed to be able to maintain colored cells during the move?
- If so, do you know or see anything obvious I need to do?
|All times are GMT. The time now is 04:40 AM.|
SEO by vBSEO ©2010, Crawlability, Inc.