Excel COM Interop - get_Range Exception from HRESULT: 0x800A03EC.
I am recieving this exception:

    System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC.

on this bit of code:

             foreach(Excel.Range rng in xlWorkSheet1.UsedRange.Cells)
                {       
                    
                    if (rng.Value2 != xlWorkSheet2.get_Range(rng,Type.Missing).Value2) //here
                    {
    ...........

Im basically trying to compare two excel files cell by cell in c# but get_range seems to be giving me this error.

Any ideas?

Thanks
Excel COM Interop - get_Range Exception from HRESULT: 0x800A03EC.
===

I am recieving this exception:

    System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC.

on this bit of code:

             foreach(Excel.Range rng in xlWorkSheet1.UsedRange.Cells)
                {       
                    
                    if (rng.Value2 != xlWorkSheet2.get_Range(rng,Type.Missing).Value2) //here
                    {
    ...........

Im basically trying to compare two excel files cell by cell in c# but get_range seems to be giving me this error.

Any ideas?

Thanks