System.Runtime.InteropServices.C
2019-12-18 本文已影响0人
何未生
WST.Range["A1:N3"].Value2 = ORG;
将二维数组赋值给range时提示错误:
System.Runtime.InteropServices.COMException:“异常来自 HRESULT:0x800A03EC”

查到某博客说时由于单元格赋值内容过长,这个博客启发了我,于是打点调试,发现是由于生成的一列公式少写了个括号。

所以这个错误应该是数组的问题,不要慌,一步一步运行下来就知道问题在哪里了。