I think this is happening because Dataview considers anything that starts with an equals sign to be an “inline query”. You could turn off inline queries, or change the prefix in your Dataview settings:
@webinspect Thanks for the tip on changing the prefix. I wish either DataView would only evaluate if the language syntax is set to dataview. Even better if Obsidian had a way to just take the content as is without any plugin processing.
That second part will effectively disable a lot of plugin functionality. The occasional conflicting syntax issue like you’ve experienced here is the result of our opportunity to have this great possibility to enhance Obsidian to be an even better tool.
So you’ve got two options given that you want your Excel formula to show as code, change the prefix as indicated above, or disable “Enable Inline Queries” from Settings > Dataview. The latter will of course remove the possibility to do just the inline queries, but that might not be something you’d miss anyways?
If changing the prefix, I would suggest doing a search for "`=" first, just to verify that you’re not using it anywhere. And if you find it somewhere, then change it to whatever you choose for your new prefix.
Some more esoteric options
I tried doing a <code> around the text, but that didn’t work. You could possibly add some of the unicode space characters to trip the syntax detector from Dataview.
Or maybe remove the = in front?! Or you could replace the equal sign, with a different unicode equal sign, if there exists such a thing, but then copy-pasting the example code could become an issue.
If you’re ready to type a little more, you could consider doing <kbd>= repeat(‘|’, 100</kbd>, which will produce a similar style in reading view, but in live-preview the HTML tags will show.
All in all, changing the prefix or disabling the inline queries, are most likely the best options.