Let's say I have a string
representing a formula which is valid in a German Excel
(only):
=SUMME(B1; C1)
Is there a way I can translate formulas like this one to the current locale of Excel (or any language of choice) assuming the input formula is in a clearly defined language like e.g. German using C# code? The expected output for English would be:
=SUM(B1, C1)
As you can see, it mostly comes down to replacing the function names/keywords with their translated counterparts but this probably requires some formula parsing to be perfect.
Note that under the hood Excel stores formulas language independently already. The same Excel sheet can be opened and edited in any language. The catch is, inputting formulas has to be in the current language or it will be invalid (!). There is no such thing as a universal formula which can be pasted into any language Excel and it will work exactly the same. Not even when they're written in English.
I do not need something like an "Excel formula to C# code converter" but a means of taking the current formula language, target language and formula as input and produces the valid target language formula.
Here is a similar question but using VBA code.