Escaping in the Text format string is essential. As Excel and Power Fx pluck more characters for placeholders, it is critical that makers have a way to reliably insert the character that they want.
Excel handles escaping of placeholder characters in two ways:
Backslash before each character
Double quoted string within the format string
It does not support single ticks for escaping, the ticks are passed through.
Escaping in the Text format string is essential. As Excel and Power Fx pluck more characters for placeholders, it is critical that makers have a way to reliably insert the character that they want.
Excel handles escaping of placeholder characters in two ways:
Now the C# interpreter:
Lines 3, 8, and 9 are incorrect, and lines 6-8 are missing the decimal point. Canvas gets many of these wrong in other interesting ways.
Tests for these scenarios can be found in Power-Fx/src/tests/Microsoft.PowerFx.Core.Tests/ExpressionTestCases/Text_ExcelCompat.txt at gregli/text-excel · microsoft/Power-Fx (github.com)