-3

我需要使用 C# 访问 Excel 工作表中的单元格。我尝试使用以下代码:

if (xlWorksheet.Cells[k + 5, 0] == Convert.ToString(ent.Cells[i, 3].Value))
{ 
     p = k;
}

Visual Studio 中出现以下消息:

Error 1 One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll?

4

1 回答 1

1
 if (xlWorksheet.Cells[k + 5, 0].Text == Convert.ToString(ent.Cells[i, 3].Value   ))
   { 
     p = k;
   }
于 2013-11-12T16:59:40.510 回答