小编use*_*027的帖子

c#npoi excel 如何获取单元格的公式值?

我在循环中的某些单元格上设置了一个公式,如下所示:

System.String fm = "IF(B2,J2=J1,FALSE)"
another.GetRow(0).CreateCell(28).SetCellFormula(fm); 
Run Code Online (Sandbox Code Playgroud)

我一直想知道如何获得这个公式的结果(值)而不是复制整个公式。

MessageBox.Show(another.GetRow(0).GetCell(28).ToString);
Run Code Online (Sandbox Code Playgroud)

它显示值 IF(B2,J2=J1,FALSE)

如何得到结果(值)而不是公式?

c# excel npoi

7
推荐指数
2
解决办法
1万
查看次数

标签 统计

c# ×1

excel ×1

npoi ×1