in attached project you can find simple code that is looping through formulas and making replacements. Unfortunately, after few replacements (212) it is throwing “Unhandled Exception: Aspose.Cells.CellsException: Cannot change part of the array/table formula”.
@dr.doc,
We have logged the issue as “CELLSNET-47779” in our database for investigations. Once we will have some news for you, we will update you in this topic.
This is not an issue with the APIs. We think the message of the exception has explained the reason clearly. For array formulas applied on multiple cells in a range, you cannot change part of it, such as, modifying one cell’s formula. It is the same behavior of MS Excel. For such kind of formulas, you should remove the array formula for all the cells in the range together, and then set different formulas for them one by one or just set another array formula for the same range.
I understand protection that you built protected but I am trying to change all formulas meaning that when my complete processing is done they all ok should be. If I missed something then this is my responsibility :).
Any chance to allow changes and shift responsibility on us using Aspose components?
@dr.doc,
Not like the CTRL+H operation in MS Excel which is a single operation, your code is changing cells one by one. Cell.Formula is an operation that you may call it anywhere and at anytime for a single cell. How can we know that you want to modify all cells together and how can it be ensured that those steps will update all cells in the range correctly?
For your requirement, we may consider to provide one single API to make modifying all formulas as one unique operation in later fix or versions. If you need that feature please let us know. We will create a separate ticket for it.
Currently the workaround should be that you detect array formulas and reset them yourself in the program.
If you can add one single API to make modification of all formulas as one unique operation that will be very appreciated as we have requirement to do this kind of actions and currently only way is to loop through all formulas (which is ok) except that this is not possible to array/table formulas like reported here.
Please create new ticket and thanks in advance,
Oliver
We have created a new ticket with an id “CELLSNET-47783” for it. The ticket is logged as following:
CELLSNET-47783 - Modify all formulas via single API as a unique operation
Once we have an update on it, we will let you know.
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.