我需要使用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?
答案 0 :(得分:1)
if (xlWorksheet.Cells[k + 5, 0].Text == Convert.ToString(ent.Cells[i, 3].Value ))
{
p = k;
}