去掉 ExcelConnection.Open方法中的抛出异常:
Open方法修改后的代码应该是
public override void Open()
{
try
{
string str = y.d(this.GetType().AssemblyQualifiedName);
if (str == null)
{
}
if (y.c(str) != y.n)
{
}
this.l = ConnectionState.Connecting;
this.a(this.i, this.p);
this.l = ConnectionState.Open;
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
Exception exception = exception1;
this.l = ConnectionState.Closed;
throw;
}
}
{
try
{
string str = y.d(this.GetType().AssemblyQualifiedName);
if (str == null)
{
}
if (y.c(str) != y.n)
{
}
this.l = ConnectionState.Connecting;
this.a(this.i, this.p);
this.l = ConnectionState.Open;
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
Exception exception = exception1;
this.l = ConnectionState.Closed;
throw;
}
}