469,323 Members | 1,551 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

Error when export to excel

Hi..

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">
..............
</html>

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 1133

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 zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.