Search code examples
.netexceloffice-interop

Any ideas why excel interop reads many decimals as -2146826246?


I'm absolutely sure that I haven't changed a thing.

For some reason, excel interop has started reading cells with decimals with same mystic value:

-2146826246

I'm absolutely clueless on what to do next, what to look for.

OS: windows7 enterprise edition, MSOffice: 2010 professional plus

Any ideas what this could be?

Recent updates:

enter image description here


Solution

  • It is not that unusual. When you convert it to hex, you get 0x800A07FA. Which is an error code. The last 4 digits is the Excel error, producing 2042. Google "Excel error 2042", first hit tells you it means "match not found" or "#N/A".

    That's as much as I can reverse-engineer. Start by taking a critical look at the error handling in your code. Don't mess with the install.