Related questions
Better way to cast object to int
This is probably trivial, but I can't think of a better way to do it. I have a COM object that returns a variant which becomes an object in C#. The only way I can get this into an int …
How do I properly clean up Excel interop objects?
I'm using the Excel interop in C# (ApplicationClass) and have placed the following code in my finally clause:
while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { }
excelSheet = null;
GC.Collect();
GC.WaitForPendingFinalizers();
Although this kind of works, the Excel.exe process …
Exception from HRESULT: 0x800A03EC Error
I am getting "HRESULT: 0x800A03EC" error when running Excel add-in with following code:
Excel.Range rng = ActiveSheet.Cells[x, y] as Excel.Range;
string before = rng.Value2;
string cleanV = System.Text.RegularExpressions.Regex.Replace(before, @"\s+", "");
rng.set_…