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.
[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 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.
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.
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
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.