Mondeo Posted June 18, 2007 Posted June 18, 2007 Hi, I have the following code which generates an Excel document on the fly. I then want to take the file and let the user decide to save it or open it. Dim xls As New ExcelFile Dim fileName As String = xls.Generate() Dim file As New IO.FileInfo(fileName) Response.Clear() Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name) Response.AddHeader("Content-Length", file.Length.ToString()) Response.ContentType = "application/excel" Response.WriteFile(file.FullName) Response.End() When it runs I get the egg timer for a few seconds, then the error message icon in the bottom left of the browser appears. The message is. The data nessessary to complete the operation is not yet available Any help appreciated? Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.