Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

recordset changes upsets creation of xls file.

Status
Not open for further replies.

grnzbra

Programmer
Mar 12, 2002
1,273
US
I have a file, Current_Allocation.asp, which contains a recordset as source for a table and the following lines


Response.ContentType="application/vnd.ms-excel"
Response.AddHeader "content-disposition", "attachment; filename=" & strFilename

It works nicely, creating Current_Allocation.xls. I used this file as a model to create a new file( Current_Allocation_Summary.asp), with a different table and a different recordset. However, the process for cretating an Excel file now tries to create the file Current_Allocation_Summary.asp.

I don't see the strFilename being set anywhere in either of the asp files or in any of the vb or js include files.
(If I substitute the recordset and table from Current_Allocation.asp into the new file, it works fine.)

Does anyone have any idea what might be happening?
 
OOps.

That should be Current_Allocation_Summary_asp with no extension.
 
OK. Let's try again.

The file that Current_Allocation_Summary.asp tries to create is Current_Allocation_Summary_asp, not Current_Allocation_Summary.asp.
 
Here's something Interresting. I just changed:

Response.AddHeader "content-disposition", "attachment; filename=" & strFilename

to

Response.AddHeader "content-disposition", "attachment; filename=HoHoHo.xls

and the result is the same. It tries to create the file
Current_Allocation_Summary_asp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top