title: insert value from a textbox to a particular cell in excel in C#.NET
body: <pre><code>      Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();
         //Static File From Base Path...........
         //Microsoft.Office.Interop.Excel.Workbook excelBook = excelApp.Workbooks.Open(AppDomain.CurrentDomain.BaseDirectory + "TestExcel.xlsx", 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
         //Dynamic File Using Uploader...........
         Microsoft.Office.Interop.Excel.Workbook excelBook = excelApp.Workbooks.Open("C:\\Users\\madduru\\Desktop\\Design.xls", 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
         Microsoft.Office.Interop.Excel.Worksheet excelSheet = (Microsoft.Office.Interop.Excel.Worksheet)excelBook.Worksheets.get_Item(1); ;
         Microsoft.Office.Interop.Excel.Range excelRange = excelSheet.UsedRange;
  
         excelSheet.Cells[4, 6] = Results.Text;
         excelBook.Save();
         excelBook.Close(true, null, null);
         excelApp.Quit();
  </code></pre>
  
  <p>I'm trying to insert a value(number) given by the user to a particular cell in excel and trying to save it. My code doesn't save the value to that particular cell [4,6]. Compatibility error with excel workbook.
  Any help is hugely appreciated. Thanks</p>