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

Content Type = EXCEL in browser

I'm trying to change content type of an ASPX page in the
browser and send some data so the browser mimics an EXCEL
spreadsheet (changed the content type to excel for the
ASPX page), but its getting the data from a previous page.
I'm doing a server transfer from a previous page. I've
also tried to flush the buffer at the page load before I
do anything, but this doesn't work. Below is my code. I'd
appreciate anyone who could lead me to a Q article on how
to do this in .NET. I've done this in classic ASP, but
not .NET.

Thanks

Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not IsPostBack Then
Response.ClearContent()
Response.Buffer = True
Response.ContentType = "application/vnd.ms-
excel"
'''''''''''''''''''''''''''''''''''''''
'''''''''''''
dvwEntityTypeProperties = New
DataView(dtblEntityTypeProperties)
dvwEntityTypeProperties.Sort = "Name"
Dim aCnt As Integer =
dvwEntityTypeProperties.Count
drgEntityTypeProperties.DataSource =
dvwEntityTypeProperties
y = 0
For Each fr In findResults.Results
dvwEntityTypeProperties(y)
("RedCircle") = "RedCircle" & CType(y + 1, String)
y = y + 1
Next

drgEntityTypeProperties.DataBind()
'''''''''''''''''''''''''''''''''''''''
'''
End If

Catch myException As SoapException

Debug.Assert(False, "Error occurred while
attempting to perform a FindNearby request: " +
myException.Message)

End Try
End If

End Sub
Nov 17 '05 #1
0 1774

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

Similar topics

3
by: yanir | last post by:
Hi I use reponse.contenttype = "application/vnd.ms-excel" So the browser will show the data in excel format, but for some fields I use leading zero's, which truncated by the browser, at this...
2
by: bill | last post by:
Hi All, When I send html content with Excel MIME type, the page break style sheet {page-break-before: always} doesn't work at Excel spreadsheet. Any idea to convert html page break style sheet to...
0
by: Chris Davoli | last post by:
I'm trying to change content type of an ASPX page in the browser and send some data so the browser mimics an EXCEL spreadsheet (changed the content type to excel for the ASPX page), but its...
3
by: hunt n peck | last post by:
is there a manual way code the "ContentType" header property? if i build an HTML page with <meta name="Content-Type" content="application/vnd.ms-excel"> in the header the browser just loads the...
4
by: Jed | last post by:
I have looked everywhere and cannot find a resolution for this. I have read several post on this forum that allude to similar issues but I have not found a solution. I am sending dynamic...
1
by: athirumurthi | last post by:
I have a WinINet communicating with an integration server (X-AspNet-Version: 1.1.4322) using form posts. One form post that includes jpeg content. However, the data received at the server is...
0
by: veenakj | last post by:
Hello, We use ASP.NET. We have a page with Excel download link when clicked it is supposed to render the excel data in browser. Below is the header info we set Response.ContentType =...
4
by: shypen42 | last post by:
Hi, I'd like to know how to serve web pages as "cleanly" as possible, maybe validating them if it's possible. How should I do to both respect standards *and* have it work under the various IE...
3
by: Bob Murdoch | last post by:
I'm using the following to send a binary file to a user: Response.AddHeader('Content-Disposition','attachment;filename=' + Request('FileName') + ';'); var vType = 'application/octetstream';...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.