AllowEditRanges are not copied with worksheet.copy()

Hello,

It appears that when you copy a worksheet the Allow Edit Ranges section in Excel is not copied to the new worksheet. Code sample below with a source and output file attached. Note that cell C2 on Sheet1 is editable due to Allow Edit Ranges, but cell C2 on sheet copy is not editable.

Example Files.zip (14.5 KB)

    [Test]
    public void foo34()
    {
        var workbook = new Workbook(@"ProtectedSheet.xlsx");
        var sourceSheet = workbook.Worksheets["Sheet1"];
        var targetSheet = workbook.Worksheets.Add("Copy");
        targetSheet.Copy(sourceSheet);
        workbook.Save(@"ProtectedSheet_saved.xlsx");
    }

Thank you,
-Andy

@weissa,

Thanks for the template Excel file.

Thank you for providing the Excel template file. After conducting initial testing, we were able to reproduce the issue you mentioned. It seems that when we copy a worksheet, the “Allow Edit Ranges” section in Excel is not properly transferred to the new worksheet. However, Microsoft Excel is able to copy protection/unprotection settings without issue.

We need to evaluate your issue in details. 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-54327

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.

@weissa,

We are pleased to inform you that your issue has been resolved. The fix will be included in our upcoming release (Aspose.Cells v23.10), scheduled for release in the next week or so. We’ll let you know when the next version is released.

@amjad.sahi,

That was an incredibly fast turn around, my customer will be very pleased. Thank you for the support.

Andy.

@weissa
You are welcome! If you have any other issue, please feel free to contact us.

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