473,395 Members | 1,938 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,395 software developers and data experts.

Export to Excel: Page cannot be displayed

I've created an asp.net page that renders an html table. Using ContentType="application/vnd.ms-excel" it will open in the browser as an excel file on 4 out of the test machines I have available to me. On one machine it consistently comes back with a standard "Page cannot be displayed" error. When i remove the ContentType line, the page will render correctly. As long as that attripbute is set, however, the one machine always fails. All the machines have pretty much identical builds of Win2k with .net 1.1, Office 2k, and internet explorer 5.5+ (the machine giving me errors is running 6.1 128 bit). An earlier version of this same asp (proof of concept) also is displaying the error, but did not two months ago

This gets deployed next week to a target audience of approximately 5000 users, so I'd appreciate any info I can get

Thanks

j
Nov 18 '05 #1
1 3615
Try:
Response.ContentType = "application/vnd.ms-excel"
Response.Charset = String.Empty
Also, if the data is coming from a datagrid, turn off the viewstate while
you are downloading to Excel.
<datagrid>.EnableViewState = False

"jeremy" <an*******@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.com...
I've created an asp.net page that renders an html table. Using ContentType="application/vnd.ms-excel" it will open in the browser as an
excel file on 4 out of the test machines I have available to me. On one
machine it consistently comes back with a standard "Page cannot be
displayed" error. When i remove the ContentType line, the page will render
correctly. As long as that attripbute is set, however, the one machine
always fails. All the machines have pretty much identical builds of Win2k
with .net 1.1, Office 2k, and internet explorer 5.5+ (the machine giving me
errors is running 6.1 128 bit). An earlier version of this same asp (proof
of concept) also is displaying the error, but did not two months ago.
This gets deployed next week to a target audience of approximately 5000 users, so I'd appreciate any info I can get.
Thanks.

j

Nov 18 '05 #2

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

Similar topics

0
by: Funbeat | last post by:
Hi everybody, I'm facing with the following problem (bug ?) : A page is calling another one (export.aspx) for exporting data to excel. The tecnhique used is to create a Excel-MIME stream...
1
by: Matt | last post by:
I have an ASP page that calls ASP routines that I created that execute a database query and return the results to a recordset. I then iterate through the recordset and display the data in a table....
9
by: | last post by:
I have a web page written in asp.net that has multiple datagrids on it that would need to be exported to Excel. Each of the datagrids would be a subset of what the datagrid above it was. Thus...
0
by: jeremy | last post by:
I've created an asp.net page that renders an html table. Using ContentType="application/vnd.ms-excel" it will open in the browser as an excel file on 4 out of the test machines I have available to...
3
by: mattdaddym | last post by:
Hi all, I have been using the following code to export my datagrids to excel for quite some time. Very simple and very effective. <code> Sub btnExcelExport_Click ( s As Object, e As...
1
by: forumaic | last post by:
Hello, I am trying to export data to excel from datagrid, and I am getting an error: "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)." ...
5
by: karthick | last post by:
Hi, I am exporting a Gridview to Excel and it works fine without any issues. But as one of the field holds values such as "71646E100" it gets converted to: "7.16E+104" (like a formula) in...
7
Merlin1857
by: Merlin1857 | last post by:
Its great producing data for users to look at in your web pages and generally that is sufficient for their needs but sometimes you may want to supply your user with the data in a form they can...
1
by: suresh76 | last post by:
I am having reports generated in jsp with HTML codings in tabular format. On report displayed page I have to use one button , which on click has to export to excel sheet. I tried using below code....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.