从HRESULT:0x800A03ECexception,同时用interop打开文件时,错误消息Excel无法使用可用的资源继续执行此任务

我收到一条错误消息,说Excel无法用可用的资源继续执行此任务,然后从HRESULT:0x800A03EC发生exception,我认为这与我的Excel应用程序有关,我只尝试使用一次,然后使用对于我的应用程序中的所有操作,这是我的实例声明:

namespace VID { public partial class VID_MAIN_FORM : Form { [DllImport("user32.dll")] static extern int GetWindowThreadProcessId(int hWnd, out int lpdwProcessId); public static Excel.Application xlApp = new Excel.Application(); System.Threading.ManualResetEvent _busy = new System.Threading.ManualResetEvent(false); Dictionary<string,Tuple<string, Dictionary<string, string>, List<Tuple<string, string>>,string>> FinalReportErrorList = new Dictionary<string, Tuple<string, Dictionary<string, string>,List<Tuple<string,string>>,string>>(); Tuple<string, Dictionary<string, string>,List<Tuple<string,string>>,string> Creator_Error; Dictionary<string,Tuple<string, string, string,Dictionary<string,Tuple<string,string>>,string>> SFinalReportErrorList = new Dictionary<string, Tuple<string, string, string, Dictionary<string, Tuple<string, string>>,string>>(); Tuple<string, string, string, Dictionary<string,Tuple<string,string>>,string> ServiceErrors; //TaskCompletionSource<bool> _tcs; 

当我调用xlWorkbook = xlApp.Workbooks.Open(xlFile);

  private Tuple<string,string,string> VerifyProvider(Tuple<string,string> Provider, string xlFile, string xlSpreadsheet) { Tuple<string, string, string> ProviderInfos; Excel.Workbook xlWorkbook; string xlFileName = xlFile.Remove(0, xlFile.LastIndexOf('\\') + 1); bool exist = false; if (SrcIsOpen(xlFileName)) { xlWorkbook = xlApp.Workbooks[xlFileName]; } else { xlWorkbook = xlApp.Workbooks.Open(xlFile); } Excel.Worksheet xlWorksheet = xlWorkbook.Sheets[xlSpreadsheet]; Excel.Range xlRange = xlWorksheet.UsedRange; 

感谢您的帮助!