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

Free Support Forum - aspose.com

Wrong RefersTo on name after rename a sheet

Hi, please try this code:

Aspose.Cells.License c_license = new Aspose.Cells.License();

Workbook aWk = new Workbook();
int iName = aWk.Worksheets.Names.Add(“FirstSheet!$A$1”);
aWk.Worksheets.Names[iName].RefersTo = “=FirstSheet!$A$1”;

Console.WriteLine(“Ok RefersTo: {0}”, aWk.Worksheets.Names[“FirstSheet!$A$1”].RefersTo);
Console.WriteLine(“Ok R1C1RefersTo: {0}”, aWk.Worksheets.Names[“FirstSheet!$A$1”].R1C1RefersTo);

Console.WriteLine(“Rename FirstSheet --> NewName”);
aWk.Worksheets[“FirstSheet”].Name = “NewName”;

Console.WriteLine("—> KO RefersTo: {0}", aWk.Worksheets.Names[“NewName!$A$1”].RefersTo);
Console.WriteLine(“Ok R1C1RefersTo: {0}”, aWk.Worksheets.Names[“NewName!$A$1”].R1C1RefersTo);

Console.WriteLine(“press any key…”);

After renaming a sheet, properties RefersTo and R1C1RefersTo are different. Is it a bug ? Or simply (if, for example, I have to rename name after rename sheet) I have to use only R1C1RefersTo property and ignore RefersTo ?

I’m using version Aspose Cells for .Net 2.0

Thanks in advance for your support

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code.

We have found your mentioned issue after an initial test. We will look into it and get back to you soon. Your issue has been registered in our internal issue tracking system with issue id: CELLSNET-17144.

Thank You & Best Regards,


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

Thank you.

thanks for support.
It works fine now !!