运行时绑定程序异常未处理 [英] Runtime binder exception was unhandled
本文介绍了运行时绑定程序异常未处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
// Resize the columns
oRange = oSheet.get_Range(oSheet.Cells[1, 1],
oSheet.Cells[rowCount, dtFinal.Columns.Count]);
oRange.EntireColumn.AutoFit();
嗨。我有一个错误的RuntimeBinderException未处理
Hi. I have an error of RuntimeBinderException was unhandled at
get_range(oSheet.Cells[1,1]
我如何解决这个问题?很高兴得到任何帮助!谢谢!
我尝试了什么:
试图在网上搜索快速答案但是没有avail
How do I solve this issue? Any help would be gladly appreciated! Thank you!
What I have tried:
tried to search for quick answers on online but to no avail
推荐答案
在你的代码周围放一个try / catch
块:
< br $>
Put atry/catch
block around your code:
try
{
oRange = oSheet.get_Range(oSheet.Cells[1, 1],
oSheet.Cells[rowCount, dtFinal.Columns.Count]);
oRange.EntireColumn.AutoFit();
}
catch (Exception ex)
{ // put a breakpoint here, and when your code throws the exception, inspect "ex"
}
这篇关于运行时绑定程序异常未处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文