FileStream fs = File.Open(path,FileMode.Open);
报什么错?

解决方案 »

  1.   

    我搞错了,是for循环里bianhao[i] = (int)cell.NumericCellValue;出错的,
    但是我看不懂错误信息,你给看下    protected override void Dispose(bool disposing)
            {
                if (disposing && (components != null))
                {
                    components.Dispose();
                }
                base.Dispose(disposing);
            }
      

  2.   

    晕,看来你不太会调试。你给我的代码没什么用,我要的是中文的错误描述。(int)cell.NumericCellValue,循环到cell.NumericCellValue错误的时候,这里的值是多少。很有可能是强转失败。
      

  3.   

    应该是你循环中i的取值不对,与xls文件中没有对应上