I have been working in Excel for many years and constantly find such quirks. If you are using .NET 4.0, try the following:
using Excel = Microsoft.Office.Interop.Excel
var range = oSheet.Cells[3, 15];
range.Value2 = "1";
Otherwise, try the following:
using Excel = Microsoft.Office.Interop.Excel
Excel.Range range = (Excel.Rang)oSheet.Cells[3, 15];
range.Value2 = "1";
A value of 2 seems to work more consistently, so I usually recommend using it.
Hooray!
source
share