System.IO.Stream writing binary to users browser

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mazdotnet

    #1

    System.IO.Stream writing binary to users browser

    Hi all,

    I'm trying to integrate a third party library that would parse an
    excel file and allows us to make changes to. Once I update the
    appropriate cells, I want to allow my users to download the modified
    file.

    It works by
    IWorkbook book =
    NativeExcel.Fac tory.OpenWorkbo ok(this.MapPath (FileName));
    ... I do all my modifications here
    book.SaveAs(whe re one of the options is System.IO.Strea m outputstream)

    Now if I want to allow users to download this file, how would use the
    System.IO.Strea m in the following context?

    Response.AddHea der("content-disposition", "attachment ; filename=
    \"myfile.xls\"" );

    // here

    Response.Flush( );
    Response.End();

    Thank you
    Maz.
Working...