Stream RequestStream; BinaryReader Br; BYTE [] Bytedata; long datalent = request.inputstream.length;
BYTEDATA = New byte [DataLen]; RequestStream = Request.InputStream; br = new binaryreader (RequestStream);
Br.read (Bytedata, 0, (INT) DATALEN;
br.Close (); requestStream.Close (); Response.ClearContent (); Response.ClearHeaders (); Response.ContentEncoding = System.Text.Encoding.UTF8; Response.ContentType = "application / vnd.ms-excel";
Response.addheader ("Content-Disposition", "Inline / attachment; filename = Test.xls"); response.binaryWrite (Bytedata); / summary is enough. Please take the status of the view of the page at the same time.