We have the following test spreadsheet: IncorrectFormulaR1C1.xlsm.zip (6.9 KB)
And the following test code:
var workbook = new Workbook("IncorrectFormulaR1C1.xlsx");
var formula1 = workbook.Worksheets[0].Cells["A3"].R1C1Formula;
// Actual: =SUM(R[-2])
var formula2 = workbook.Worksheets[0].Cells["B3"].R1C1Formula;
// Actual: =SUM(R1)
var formula3 = workbook.Worksheets[0].Cells["C3"].R1C1Formula;
// Actual: =SUM(R1)
// Expected: =SUM(R1:R[-2])
var formula4 = workbook.Worksheets[0].Cells["D3"].R1C1Formula;
// Actual: =SUM(R[-2])
// Expected: =SUM(R[-2]:R1)
The R1C1 formula returned by Aspose is incorrect for cell C3 and cell C4. It is related to the combined absolute and relative reference to one full row. The formulas returned by Aspose are different than in Excel:
Can you fix this bug? We need the exact correct R1C1 formula in one of our applications. This is tested with Aspose.Cells v21.4.0 for .NET Core.