0

Is there any way to replace old version of excel add-in custom formulas to the new version of add-in custom formula using excel javascript api and angular ?

like this : =OLD.GET(A5,B5,C5) to this : =NEW.GETGD(A5,B5,C5)

in workbook, worksheet and at cell level.

3
  • This is much more complex than just a search and replace; to do this properly, you'd need to parse all formulas in full (because there could be nested calls to the add-in function). It's also possible the function is called elsewhere (e.g. in conditional formatting, in data validation or by an Excel name), which Find & Replace won't detect. An alternative approach might be to define a new proxy function with the old name which calls the new function, so that all existing formulas still work; however, you won't be able to do this through VBA if your function name includes a full stop (.). Commented Jun 20, 2024 at 7:59
  • A Find and replace would work, provided (as @Neil T says) the UDF is only used in cell formulas. You would need to make sure you are doing the replace only for relevant hits, so you would have to fully parse the formulas to ensure you're not replacing inside strings, or replacing a substring that isn't a true match, ending up with changing SomeOtherOLD.GET(...) into SomeOtherNEW.GETGD(...). Unlikely? Maybe, but you're messing with someones spreadsheet so it better be accurate. Commented Jun 20, 2024 at 13:15
  • but excel only allows to use find with text on cell not formula Commented Jun 21, 2024 at 9:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.