G
Guest
Hello All,
Here is a little problem I ran into. I'd like to see if anyone can help me solve it
I have an HTML table that I assign to a label control. I set my Response.ContentType = "application/vnd.ms-excel", so that I can present this html table as an Excel Document. If the amount of data (number of rows) in the table is relatively low, the Excel Document is processed with no problems. When a larger set of data is assigned, however, the Excel Document cannot detect the HTML Table to process. I assume this is due to the ViewState input string. I believe that Excel will only go through so many lines before it determines what can be processed in tabular form.
The plot thickens..
When I disable ViewState, I get garbage printed on an Excel sheet.. The Excel sheet freezes for a good 3 minuets or so, and prints gibberish.
Here is my code:
-----------------------------------------------------------------------------------------------------------------------------------------
private void Page_Load(object sender, System.EventArgs e
Response.ContentType = "application/vnd.ms-excel";
if(Session["exceldata"] != null)
{
lblExcel.EnableViewState = false
lblExcel.Text = (Session["exceldata"].ToString())
-----------------------------------------------------------------------------------------------------------------------------------------
Any thoughts? Ideas? Advice?
I'd appreciate it if you have one for me!
Thank you in advance.
-Eyal Zinder
Here is a little problem I ran into. I'd like to see if anyone can help me solve it
I have an HTML table that I assign to a label control. I set my Response.ContentType = "application/vnd.ms-excel", so that I can present this html table as an Excel Document. If the amount of data (number of rows) in the table is relatively low, the Excel Document is processed with no problems. When a larger set of data is assigned, however, the Excel Document cannot detect the HTML Table to process. I assume this is due to the ViewState input string. I believe that Excel will only go through so many lines before it determines what can be processed in tabular form.
The plot thickens..
When I disable ViewState, I get garbage printed on an Excel sheet.. The Excel sheet freezes for a good 3 minuets or so, and prints gibberish.
Here is my code:
-----------------------------------------------------------------------------------------------------------------------------------------
private void Page_Load(object sender, System.EventArgs e
Response.ContentType = "application/vnd.ms-excel";
if(Session["exceldata"] != null)
{
lblExcel.EnableViewState = false
lblExcel.Text = (Session["exceldata"].ToString())
-----------------------------------------------------------------------------------------------------------------------------------------
Any thoughts? Ideas? Advice?
I'd appreciate it if you have one for me!
Thank you in advance.
-Eyal Zinder