473,324 Members | 2,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Generating Excel with HTML

In my ASP.NET application, I have a table (really a datagrid) that I am
converting into an Excel sheet using ContentType =
"application/vnd.ms-excel". It seems to work fine for most of my results,
but if my table gets too long, I get a message saying "Excel is unable to
read the file".

Any ideas? Is there a fixed limit on the size of the table that can be sent
to Excel in this fashion?

Thanks,

Evan
Nov 18 '05 #1
4 1255
Hi Evan,

Excel's specifications have a maximum limit of 65,536 rows by 256 columns .

Is it possible that your large table is hitting the row limit?
"Evan T. Basalik" <EB*************@trimech-nospam.com> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
In my ASP.NET application, I have a table (really a datagrid) that I am
converting into an Excel sheet using ContentType =
"application/vnd.ms-excel". It seems to work fine for most of my results,
but if my table gets too long, I get a message saying "Excel is unable to
read the file".

Any ideas? Is there a fixed limit on the size of the table that can be
sent
to Excel in this fashion?

Thanks,

Evan


Nov 18 '05 #2
Hi Evan T. Basalik,

Thank you for using Microsoft Newsgroup Service. Based on your description,
you used a table(DataGrid) to generate the datas and output them as a Excel
table in a ASP.NET webpage. However, you found that sometimes the
converting will fail for some unknown reason, is my understanding correct?

If so, here is my sueestion:
1. What about the quantity of the table's data when the converting failed.
Does your large table hit the row limit of a normal excel worksheet as Ken
Cox mentioned?

2. Is there anything different on the table's data format or other format
on the table(DataGrid) from those ones which didn't cause error?

Please have a check on the above items and if you still feel unclear on it
, would you please provide a simple html code for the certain table that
can cause the converting fail? Thus, I can do some further research on it.
Also, if you have any new findings please also let me know.

Merry Christmas!

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #3
Actually, it turns out that none of those were the problem. The datagrid on my page had viewstate enabled. By turning that off, it solved the problem. Could having that turned out overloaded something in the conversion process

Evan
Nov 18 '05 #4
Hi Evan,
Thanks for your followup. I'm glad that you've figured out the problem
yourself. As for the further information you mentioned, I agree with you
that the problem is likely to caused by the ViewState. Since when convert
web page into Excel format, the excel will validate the page's content's
format, and the Large ViewState may somehow cause the Application failed to
finish the convert operation. How do you think of ?

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John | last post by:
Is there a way to generate a spreadsheet form embedded in HTML? or is there a way to retrieve information entered in an excel spreadsheet embedded in HTML Thank you John
5
by: Rimantas Žukaitis | last post by:
Hi, we are developing server side report generation application with .NET. The problem is, that we have to present same data in diferent formats (HTML, PDF, WORD, EXCEL). This has to be done...
0
by: Raghavendra | last post by:
hi, we r using forms authetication. problem :- i am using the below code to generate excel report but since we r using forms authetication.. after generating excel report the browser directs...
9
by: hari krishna | last post by:
hi, I want to send the data from dataset information to Excel through ASP.Net. there will be no XL installed on web server. web server is win 2000 server machine. I am using visual basic code in...
3
by: daniele.balducci | last post by:
Hi All, I'm generating XLS files from ASP(.Net) code using the usual code chunks ... Response.ContentType = "application/vnd.ms-excel" Response.AppendHeader("Content-Disposition", "attachment;...
0
by: Rich Wallace | last post by:
Hello all, Looking for suggestions and tips if possible. I have an application running on a file server that utilizes the FileSystemWatcher to trap when any Excel files are saved by a user. I...
8
by: matt | last post by:
hello, can anyone speak to some of the common or preferred methods for building Excel .XLS files, programmatically thru the .NET framework? i have an intranet app that needs to generate &...
2
by: | last post by:
I have some sensitive data encrypted in a database. I need to allow the authorized people to produce a report (obviously, unencrypted) that they can send to the appropriate partners. Can I set it...
1
by: Aswanth | last post by:
I'm Using Asp.Net with C# & SSRS 2005 for Generating Reports.. I'm Having HUGE Data in Microsoft Excel Sheets .. I want to Get this Data from this Microsoft Excel Sheets & to Generate REPORTS in...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.