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.
精彩评论