471,857 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,857 software developers and data experts.

Error when export to excel


I'm trying to export to excel.. using:

Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-disposition", "attachment;filename=" & sFileName
Response.AddHeader "Location",
"http://www.ascendas.com/chinapartnerrewards/" & sFileName

<html xmlns:x="urn:schemas-microsoft-com:office:excel">

but the result i got was v irregular..

Firstly, i had 3 different location that tigger this file..
1) navagtion using flash file
2) a href pointin to the same url
3) a button also pointing to the url

The button i had no problem.. but the navagation give me different results
every time i tigger it.. 1st tigger --> popup showing to open or save the
excel file (correct result).. 2nd tigger --> popup showing to open or save as
asp file(wrong result)
3rd tigger --> no popup at all, the result was show at the IE itself.. but
once i clear the cache(cookies) in the IE the result wil reset itself to the
1st tigger result..

So as my <a href> some times it works.. some time it don't..

Is there any code that i can add in to solve this problem??
I had tried adding the cachecontrol.. but it will block out my download of
excel completely..

Thanx lotx..

May 31 '06 #1
0 1201

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by anon | last post: by
reply views Thread by Mortar | last post: by
2 posts views Thread by zhollywood | last post: by
reply views Thread by forumaic | last post: by
3 posts views Thread by =?Utf-8?B?bWFuaWthMDI=?= | last post: by
reply views Thread by YellowAndGreen | last post: by

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.