title: How do I send Excel file created in Interop to browser in Razor MVC?
body: <p>So here is my code for generating the excel file in C# and Interop:</p>
  
  <pre><code>         Dictionary&lt;Item, Shift_ItemSales&gt; data = getData(curPage, depID);
  
           Application excelapp = new Application();
           excelapp.Visible = false;
  
           _Workbook workbook = (_Workbook)(excelapp.Workbooks.Add(Type.Missing));
           _Worksheet worksheet = (_Worksheet)workbook.ActiveSheet;
  
           worksheet.Cells[0, 1] = "ID";
           worksheet.Cells[0, 2] = "Description";
  
           int row = 1;
           foreach (Item curItem in data.Keys) {
               Shift_ItemSales curIS = data[curItem];
               worksheet.Cells[row, 0] = curItem.ID;
               worksheet.Cells[row, 1] = curItem.Description;
               row++;
           }
  </code></pre>
  
  <p>How do I send it to the browser and have the user download it?</p>