开发者

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 开发者_JAVA百科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:

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


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.


I am not familiar with Excel Interop but this appears to be related to a limitation of .net's understanding of Excel's various CVErr values.

There is an excellent write up on this at: dealing with cverr values

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜