We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

R1C1Formula 256 Column Limitation..?

Hi,

I am currently testing the Aspose.Cells for .NET component and I seem to have found a limitation with the R1C1Formula property of the Cell object. If I try to reference a column over 256 I get an error saying:

Invalid formula in cell

I realise that older versions of Excel had this limitation but it no longer exists. The Aspose.Cells component allows me to add more than 256 columns to my WorkSheet, so why can’t I reference these using R1C1…??

Cheers,
Jack

Hi Jack,

Please forward us your sample code so that we can thoroughly look into it. In the mean while please try the following code snippet.

Code snippet:

Workbook workbook = new Workbook( FileFormatType.Xltx);

Worksheet worksheet = workbook.Worksheets[0];

worksheet.Cells["A1"].R1C1Formula = "=SUM(R[260]C[3]:R[260]C[4])";

workbook.Save(sOutPutName, SaveFormat.Xlsx);

Thanks,

Thanks Salman,

But your example looks like it’s intended to test against a limit 256 rows not columns which is my issue:

Please consider the following example, which has been roughly adapted from yours:

Workbook xlBook = new Workbook(FileFormatType.Xlsx);
Worksheet xlSheet = xlBook.Worksheets[0];
xlSheet.Cells[“A1”].R1C1Formula = “=R1C256”;
xlSheet.Cells[“A2”].R1C1Formula = “=R1C257”;
xlBook.Save(Response, “Test.xlsx”, ContentDisposition.Attachment, new XlsSaveOptions(SaveFormat.Xlsx));

This code fails on the 4th line, where it attempts to set the R1C1 reference to Row 1 Column 257. I have also tried using the following:

Workbook xlBook = new Workbook(FileFormatType.Xltx);

As you suggested, but to no avail.

Cheers,
Jack

Hi,

After looking into your issue more closely, I can find the issue as you have mentioned. If I specify more than 256 columns in R1C1Formula attribute, I can get your mentioned error.

I have logged your issue into our issue tracking system with an id: CELLSNET-20022. We will figure your issue out soon.

Thank you.

Hi,

Please try the attached version, we have fixed your mentioned issue.

Thank you.

The issues you have found earlier (filed as 20022) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.