gpt4 book ai didi

c# - SpreadsheetGear 列总和计算

转载 作者:行者123 更新时间:2023-11-30 12:47:43 25 4
gpt4 key购买 nike

是否可以在列上设置公式,首先说“=SUM(A1:A10)”,然后在 A1 到 A10 单元格中显示值,然后进行计算。

最佳答案

是的,我得到了答案。在为此做一些 R N D 时,我意识到 Furmula 操作不适用于:

SpreadsheetGear.IRange range = WorkBookViewForData.ActiveWorksheet.Cells["A10"];
range.Formula = "=SUM(A1:A9)"
SpreadsheetGear.IRange range1 = WorkBookViewForData.ActiveWorksheet.Cells["A1"];
range1.value = "1"
SpreadsheetGear.IRange range2 = WorkBookViewForData.ActiveWorksheet.Cells["A2"];
range2.value = "2"
SpreadsheetGear.IRange range3 = WorkBookViewForData.ActiveWorksheet.Cells["A3"];
range3.value = "3"

但适用于

   SpreadsheetGear.IRange range = WorkBookViewForData.ActiveWorksheet.Cells["A10"];
range.Formula = "=SUM(A1:A9)"
WorkBookViewForData.ActiveWorksheet.Cells["A1"].Value="1";
WorkBookViewForData.ActiveWorksheet.Cells["A2"].Value="2";
WorkBookViewForData.ActiveWorksheet.Cells["A3"].Value="3";

其中 WorkBookViewForData 是 SpreadsheetGear 控件的名称

关于c# - SpreadsheetGear 列总和计算,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16051612/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com