When I try to set a R1C1Formula on cell R21 that looks like this =RC[-1]-R[-1]C I am getting an error: Invalid formula in cell IX53: =RC[-1]-R[-1]C. The same type formula is working fine on other cells in the worksheet and this is failing when it reaches column 257.
I am using Aspose version 4.9.0
Please suggest why it is getting failed and provide the solution if possible.
Since you are using some older version of the product (i.e., v4.9.0) for which I am not sure if the version supports XLSX (advanced) file format or not. I also doubt if XLSX file format was even supported by Microsoft either at that time. For your information, your issue is due to the fact that for XLS (MS Excel 97 - 2003) file format, you can only have 65536 rows and 265 columns in a worksheet. So, you got to use latest version(s) with XLSX file format which is an advanced file format (MS Excel 2007 - 2013/2016). For XLSX file format, you can have 1048576 rows and 16384 columns in a single worksheet.
FYI:
XLS
65536x256 (till column IV)
XLSX
1048576x16384 (till column XFD)
In short, there is no other alternative but to upgrade to latest versions of the APIs set which does support all the advanced file formats (XLSX, XLSM, XLSB, etc.) and you should not find any such issue using newer versions.
In that case, it might be an issue with the older version that you are using. I am afraid, we neither can evaluate your issue in older version non we can fix any issue or provide any workaround to cope with it in the older version. The only alternative to your issue is use latest version of the product. If you still face any issue with newer versions (v17.11 (latest version)), we are bound to and try to fix your issue and provide you the fix. The fixes are based on latest APIs set only.