Incorrect R1C1 formula for row references

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.

@perfectxl,
We have observed this issue and logged it in our database for further investigation. You will be notified here once any update is ready for sharing.

This issue is logged as:
CELLSNETCORE-109-Incorrect R1C1 formula fetched for row references

@perfectxl,

This is to inform you that we have fixed the issue. We will publish the fix in the next few days after performing QA and incorporating other enhancements and fixes.

@perfectxl,

Please try our latest fix v21.4.2:

Aspose.Cells21.4.2 For .Net2_AuthenticodeSigned.Zip (5.5 MB)
Aspose.Cells21.4.2 For .Net4.0.Zip (5.5 MB)
Aspose.Cells21.4.2 For .NetStandard20.Zip (5.5 MB)

Your issue should be fixed in it.

Let us know your feedback.

Thank you! I can confirm that the issue is fixed.

@perfectxl,

Thanks for your feedback.

Good to know that your issue is resolved by the new fix. In the event of further queries, feel free to write us back.