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

Prompt is displayed when writing from dataview to Excel using response object

I'm searching for some data. After getting the data from sql, i'm using
stringbuilder and then i'm passing this as a binary stream. I am trying
to display an Excel file of this data in a browser, but I am being
prompted to open/save the file instead. I don't want the user to be
prompted; I just want the Excel to be displayed. Here is the code:

Dim binaryData() As Byte

binarydata = GetDataHere()
Response.ContentType = "application/ms-excel"
Response.BinaryWrite(binaryData)
Response.End()

And also i wanted to make the heading bold and set the width for all
columns.
The Content-Type and the Content-Disposition and all have been set.
Everything is working fine except that i don't want it to prompt the
user.

Please can anyone help me with this.

Thanks and regards,
Jude

Jul 14 '06 #1
0 1072

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

Similar topics

2
by: Joseph | last post by:
Hello. I have this problem. See I have a transformed XML file and I checked its contents prior to outputting it to excel file via responseset. here is the gist of the code: XmlReader reader =...
0
by: Xavier Osa | last post by:
Hi, I have an ASP.Net web page that you can download a file. As Fergunson's problem, it prompts twice dialog boxes only if I select Open button. If I select Save button, it prompts once. I'm...
7
by: theyas | last post by:
How can I get my code to NOT display two "Open/Save/Cancel/More Info" dialog boxes when using the "Response.WriteFile" method to download a file to IE I've asked about this before and didn't get a...
1
by: Troy | last post by:
How do I answer the disable macro prompt automatically when opening an Excel workbook? We are using Excel 97 and 2002. In 2002 we want the Medium security (prompt user) to safeguard against e-mail...
1
by: Anonieko | last post by:
Here are some of the approaches. 1. Transform DataGrid http://www.dotnetjohn.com/articles.aspx?articleid=36 3. Use the Export approach ...
5
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, The following code was suggested by one of the users in this newsgroup when a pdf file was requested by a user from an asp page. I used the similar code in my page and the very interesting...
1
by: =?Utf-8?B?VGVycmFuY2U=?= | last post by:
I've been having an issue with an application that keeps track of applications that a client has by state and print this information from my ..net app to an excel file. I'm using a dataview to...
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...
2
hemantbasva
by: hemantbasva | last post by:
Note We need to have a template on server for generating report in multiple sheet as we do not had msoffice on server moreover this require a batch job to delete excel file created by the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.