EPPlus配方评估 [英] EPPlus Formula Evaluation
本文介绍了EPPlus配方评估的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用EPPlus时,我试图将公式的结果插入到单元格中
When using EPPlus, I am trying to insert the result of a formula into a cell
即:
Worksheet.Cells["A4"].Value = 3
Worksheet.Cells["A5"].Value = 4
Worksheet.Cells["A6"].Formula = "=SUM(A3:A4)"
Worksheet.Cells["A6"].Calculate()
在工作表中,我将在公式栏中看到该公式,但是我想在EPPlus中评估该公式并将该值插入单元格中。因此,当单击单元格时,我看到的只是7,而不是 = SUM(A3:A4)
In the worksheet i will see the formula in the Formula bar, but what I would like is to evaluate the formula in EPPlus and insert the value into the cell. So when clicking into the cell all i see is 7 and not =SUM(A3:A4)
原因这样做的原因是因为我有很大的工作表(出于业务原因),并且在打开时计算公式意味着加载工作表大约需要20秒
The reason for this, is because I have large worksheet (for business reasons) and having the formulas calculate when opening means the sheet takes about 20 seconds to load
推荐答案
只是为了说明swmal答案:
just to illustrate swmal answer :
这篇关于EPPlus配方评估的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文