开发者

Problem opening a csv file through asp on ie8?

From my asp application, i am trying to open a csv file onto ie8. The same 开发者_C百科code is working fine on ie6 although. Below is the code:

Set objStream = Server.CreateObject("ADODB.Stream")
         objStream.Open
    objStream.Type = adTypeBinary
    objStream.LoadFromFile strFilePath

ContentType = "application/msexcel"
Response.AddHeader "Content-Disposition", "attachment; filename=" & strFileName
Response.AddHeader "Content-Length", strFileSize
Response.Charset = "UTF-8"
Response.ContentType = ContentType
Response.BinaryWrite objStream.Read
Response.Flush

objStream.Close

Please help me undestand where i am going wrong.


This issue is resolved now. The Filesize was set to 50 which somehow worked fine on IE6. The same code when ran against IE8 trimmed down the data. I increased the file size here to 800 and got all the data onto the excel. Not sure how IE6 and IE8 interprets the file size.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜