Click to See Complete Forum and Search --> : ASP script: Exporting to excel...


Rashar
06-04-2004, 02:24 PM
Hi,

I have the following script that allows me to open an excel file, or save to the desktop fine. However, when I click save, the web page turns to action cancelled, thus allowing me to save the file which is fine, but I just want to get rid of the action cancel page. So, when I click the save button, I just want to select the location on where to save the file.

I hope this makes sense...thanks in advance.

Rashar.


<%
Response.ContentType = "application/vnd.ms-excel"

Dim SQL, RS, conntemp
SQL = "Select * FROM TBLRESPONSES WHERE Segment = 'HR'"
set RS = Server.CreateObject("ADODB.Recordset")
RS.Open SQL, Conn, 3,3

%>

<%Do While Not RS.EOF%>
<%
Response.Write ("<TR>")

Response.Write RS("Record_ID") ... etc.

<%
RS.MoveNext
Loop
%>

Rashar
06-04-2004, 03:02 PM
Please disregard my issue. I found out what the problem was. I was not calling my script from my main site.


Thanks.