C# Gembox.电子表格中的R1C1公式

C# Gembox.电子表格中的R1C1公式,c#,excel,gembox-spreadsheet,C#,Excel,Gembox Spreadsheet,我正在测试GemBox.Spreadsheet(47.0.1031),发现R1C1公式是 但是,它是如何工作的呢?到目前为止,我的测试失败了: SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY"); var f = new ExcelFile(); var ws = f.Worksheets.Add("Sheet1"); f.CalculationOptions.PrioritizeR1C1ReferencingNo

我正在测试GemBox.Spreadsheet(47.0.1031),发现R1C1公式是

但是,它是如何工作的呢?到目前为止,我的测试失败了:

SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY");
var f = new ExcelFile();
var ws = f.Worksheets.Add("Sheet1");
f.CalculationOptions.PrioritizeR1C1ReferencingNotation = true;

for(int i = 0; i<50; i++)
{
    ws.Cells[i, 0].Value = i + 1;
    ws.Cells[i, 1].Formula = "=RC[-1] * 17";
}
f.Save(..path..);
SpreadsheetInfo.SetLicense(“FREE-LIMITED-KEY”);
var f=新的ExcelFile();
var ws=f.工作表。添加(“表1”);
f、 CalculationOptions.Priorityr1Creferencegnotation=true;

对于(int i=0;i之前,R1C1表示法仅由计算引擎支持。
尽管如此,请尝试使用当前最新或最新版本

然后尝试以下操作:

var ef=new ExcelFile();
var ws=参考工作表添加(“表1”);
对于(int i=0;i<50;i++)
{
ws.Cells[i,0].Value=i+1;
ws.Cells[i,1]。公式1c1=“=RC[-1]*17”;
}
ef.Save(“output.xlsx”);