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

Free Support Forum - aspose.com

Special characters in Sheet name lead to error on using setR1C1Refers to API

Hi,

I am using Aspose.Cells v8.5.2.4
The attached workbook contains a sheet with name like Sheet1 & space ’ here
If we specify the format like ‘Sheet 1 & space ’ here’!R1C1:R2C2
in the name.setR1C1RefersTo API,we get the exception
com.aspose.cells.CellsException: Invalid formula:"=‘Sheet1 & space ’ here’!r1c1:r2c2".

Code snippet :
int rangeIndex = workbook.getWorksheets().getNames().add(“dummyrange”);
Name name = workbook.getWorksheets().getNames().get(rangeIndex);
name.setR1C1RefersTo(R1C1pattern);
name = workbook.getWorksheets().getNames().get(rangeIndex);



Can you verify this issue.

–Jaspreet

Hi,


Thanks for providing us some details and template file.

Please try using the R1C1pattern as following:
"=‘Sheet1 & space ‘’ here’!r1c1:r2c2"

Let us know if you still have any issue.

Thank you.