Solved

Excel export not happening for more than 4 mb data in ASP and vbscript.

Posted on 2009-06-29
9
821 Views
Last Modified: 2012-05-07
Hello Experts,
Here is the scenario:
I have a website in ASP/ vbscript, IIS 6.0
I run a query in Oracle 10g and get the data in an array on the front end (ASP).
The array is then used to export data in excel and shown to users.
It works fine for excel size less than 4 mb but if the excel size increases to more than 4 mb I get the error: Page cannot be displayed.
I was wondering if there is some setting that i need to do for allowing the export of data to excel which is more than 4 mb.
Any suggestions are welcomed.
Thank You.
0
Comment
Question by:Faheem Shaikh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 11

Expert Comment

by:tobzzz
ID: 24736557
Have you tried these type of setting? Note, figures are just example numbers.
<%
Session.Timeout=30
Server.ScriptTimeout=90
Response.Expires=0
%>

Open in new window

0
 
LVL 8

Author Comment

by:Faheem Shaikh
ID: 24736696
Hi TOBZZZ-
Thanks for looking into this, but its not a time out issue. But I will give this a try too.
 
0
 
LVL 11

Expert Comment

by:bmatumbura
ID: 24736750
Also check if the data you are exporting is exceeding excel's limit of 65536 rows in a worksheet
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 8

Author Comment

by:Faheem Shaikh
ID: 24736779
The max number of records is just 2000. It will never exceed to more than that. So excel's limit is never reached.
0
 
LVL 11

Expert Comment

by:bmatumbura
ID: 24736798
If the data results in more than 65536 rows when exported to excel, you may have to partition the data into multiple excel sheets. Excel can only take a maximum of 65536 rows in a worksheet and 256 worksheets in a workbook.
0
 
LVL 11

Expert Comment

by:tobzzz
ID: 24737177
if you just write it to screen, not create as an excel doc, does it still time out? If it was me, I would run the query and display on screen to eliminate if it is writing to excel that's the problem.
0
 
LVL 11

Expert Comment

by:tobzzz
ID: 24737191
sorry, not time out, but fail...... does it still fail?
0
 
LVL 8

Accepted Solution

by:
lharrispv earned 500 total points
ID: 24737536
I think I might know what your problem is.  Google for AspMaxRequestEntityAllowed and Asp Response buffer.

A few years back I was trying to do something very similar and I had to up those values in the metabase.xml file (IIS 6).  For IIS 5 it is not as easy but can still be changed.

In IIS 6 MS made smaller the amount of data that can be transfered via the http response for security reasons.  I think 4 mg is around near the new default.
0
 
LVL 8

Author Comment

by:Faheem Shaikh
ID: 24742971
Hello lharrispv,
That is exactly what i was looking for. My Sys Admin also pointed me towards the same.
I have set the AspBufferingLimit="26214400" --> 25 MB in metabase.xml file at c:\Windows\System32\Inetsrv. The default was 4 MB. AspBufferingLimit is used to set the Response limit.
Also, AspMaxRequestEntityAllowed  is actualy used to set the upload file limit to the server i.e. Request limit.
Thank You.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question