Address(NamedRange) Getting change in cell refernce when NamedRange is exists in Excel

@Coder365
Can you upload a complete console project with source files and expected files to reproduce your issue? Then we can locate your issue soon.

sorry my bad. please find correct zip here.
source_new.zip (21.4 KB)

@Jayshiv
By using sample files and code for testing, we can reproduce the issue. Failed to change cell references after copying worksheet. Please check the attachment. result.zip (93.3 KB)

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-55150

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Thanks for the update. Is there any alternative approach to fix it?
and also may I know by when this issue will be fixed? So, that we can plan accordingly.

@Coder365
This is a bug and there is currently no alternative solution. Since your issue was logged today(just a few hours ago), please allow us some time to evaluate and analyze it in detail. If it is not complex, we should be able to fix it soon, and the fix may be included in our upcoming release (Aspose.Cells v24.3 - planned for publication in the second week of March next month). If the issue is complex, it may take a few more weeks or even a month to resolve.

Additionally, if you purchase paid support, we will prioritize your issue so that it can be resolved earlier.

@Coder365,

We are pleased to inform you that your issue (logged earlier as “CELLSNET-55150”) has been resolved now. The fix/enhancement will be included in the upcoming release (Aspose.Cells v24.3) that we plan to release in the second week of March (next month). You will be notified when the next version is released.

The issues you have found earlier (filed as CELLSNET-55150) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi

Hi team, I take temp License and 24.3.0.0 version dll to check.
I’m still facing this issue some time it’s working fine and sometime its showing wrong value(Reference getting changed).
Here I am Attaching my File in that I give reference in sheet5 which is taken from sheet 2 . I give some reference between this range (sheet2 A11:C30) from that some value retain same and other value get #REF. Sometime it’s show some other cell value also . I’m not able to replicate proper scenario for that but in property I can see IsRefere is getting true but RefersTo property refereeing wrong cell
Source.zip (16.2 KB)

here my File before before I add that reference in sheet5
SourceOld.zip (13.3 KB)

@Jayshiv
By using the following sample code for testing, we can obtain the correct results. Please refer to the attachment. out_net.zip (14.1 KB)

The sample code as follows:

var excelPath = filePath + @"Source.xlsx";
var excelpath1 = filePath + @"SourceOld.xlsx";

Workbook wblob = new Workbook(excelPath);
Workbook wtemp = new Workbook(excelpath1);
foreach (var item in wblob.Worksheets)
{
    foreach (var item1 in wtemp.Worksheets)
    {
        if (item.Name == item1.Name)
        {
            item1.Copy(item);
        }
    }
}

wtemp.Save(filePath + "out_net.xlsx");

If you still have any questions or confusion, please provide sample code and the expected result file. If you could take a screenshot and highlight it to indicate the issue, it would be very helpful for us to locate the issue.

1 Like

Byte[] bytes = File.ReadAllBytes(“C:\Users\jayshiv.patel\Desktop\source.xlsx”);
Byte[] bytes1 = File.ReadAllBytes(“C:\Users\jayshiv.patel\Desktop\CopyNew1.xlsx”);
Workbook wblob, wtemp;
using (MemoryStream ms = new MemoryStream(bytes))
{
ms.Position = 0;
wblob = new Workbook(ms);
}
using (MemoryStream ms = new MemoryStream(bytes1))
{
ms.Position = 0;
wtemp = new Workbook(ms);
}
foreach (var item in wblob.Worksheets)
{
foreach (var item2 in wtemp.Worksheets)
{
if (item.Name == item2.Name)
item2.Copy(item);
}
}
wtemp.Save(“C:\Users\jayshiv.patel\Desktop\CopyNew1.xlsx”)
here is my I’m using the samecode but it’s giving wrong output sometime.
It’s causing error(worng cell reference) randomly.

@Jayshiv
Would you like to share your output file and take screenshots to highlight the errors? We will check it soon.

@Jayshiv,

Also, you did not provide the “CopyNew1.xlsx” file, is it “SourceOld.xlsx” file or some different file. If it is a different file, kindly do provide the file as well.

Sorry for that .
It’s my naming mistake SourceOld.xlsx and CopyNew1.xlsx both are same.
I just give reference from sheet2 to sheet5 in source.xlsx file and for save that new changes I’m copying worksheet one by one in to SourceOld.xlsx.
Basically both source and SourceOld file are same only new changes is not there in sourceOld.xlsx after copy and save both file will be same.

@Jayshiv,

Alright. But as @John.He asked, kindly provide the following artifacts:

  1. Your current output Excel file by Aspose.Cells.
  2. Your expected Excel file, you may use MS Excel to create the desired Excel file.
  3. Some screenshots (you may capture in MS Excel) to highlight the problematic areas and other errors.

So, we could evaluate and check your issue precisely on our end.

Sorry for Delay Here Uploading Zip file with image , xlsx file and Information text file.
Data.zip (1005.0 KB)

Thanks

@Jayshiv,

Thanks for the sample files, screenshots and details.

I was able to reproduce the problem as you mentioned with your resource files. I found the issue with cell references changes after copying worksheets.

We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-55296

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like

@Jayshiv
Please check the attached file which is generated by inner hot fix 24.3.1.
CELLSNET55296.zip (13.2 KB)

1 Like

@simon.zhao Thanks.
I check excel file which in zip file. It’s look proper now.
So, it’s available in 24.3 release or it will be available on next release.

@Jayshiv
It will be available on next release. Once the version v24.4 is released, we will notify you immediately.

1 Like

The issues you have found earlier (filed as CELLSNET-55296) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi

1 Like