title: Dynamically create excel file and download autmatically
body: <pre><code>Microsoft.Office.Interop.Excel.Application xlApp;
  Microsoft.Office.Interop.Excel.Workbook xlWorkBook;
  Microsoft.Office.Interop.Excel.Worksheet xlWorkSheet;
  object misValue = System.Reflection.Missing.Value;
  xlApp = new Microsoft.Office.Interop.Excel.ApplicationClass();
  xlWorkBook = xlApp.Workbooks.Add(misValue);
  
  xlWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
  xlWorkSheet.Cells[1, 1] = "http://csharp.net-informations.com";
  
  xlWorkBook.SaveAs("csharp-Excel.xls", Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
  xlWorkBook.Close(true, misValue, misValue);
  xlApp.Quit();
  </code></pre>
  
  <p>here is my C# button code. i just want to do this excel file download automatiacally on button click. this code generate excel file only.And how to add download code. i dont know. Example we download anything in google chrome then click the item start download. and bottom of the browser download file show. how to do this,, Please help me
  thanks in
  Advance</p>