使用C#在Excel中将单元格内容转换为字符串数据类型

在下面的代码中,我遇到了这种异常。


Data_Consistency.exe 中发生类型为“System.Runtime.InteropServices.COMException”的未处理异常附加信息:来自 HRESULT 的异常:0x800A03EC


for (i = 0; i < excelCell.Columns.Rows.Count; i++)

{

    if (excelCell.Value2 == null)

        continue;

    else

        excelWorksheet.Range[excelCell,Type.Missing].ToString();

}


阿波罗的战车
浏览 231回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP