I know that error "We Found A Problem With Some Content In Excel" has been asked a lot of times, but I haven't found my root cause for this problem.
In my excel file this error appears after I switch formula
=IFERROR(XLOOKUP([@Column1];Sheet1[Column2];Sheet1[Column3]);0)
to following formula
=IFERROR(XLOOKUP([@Column1];Value(Sheet1[Column2]);Sheet1[Column3]);0)
Basically, I am just adding Value() function as values in Column2 often appear to be "Number stored as text".
Data is added to the template file (it contains mentioned formulas) using GemBox. The algorithm is I have template, run the app that adds data to the file, then I open file and everything is good.
But as I correct the formula adding Value() function it breaks down as I try to open the file in the last step.
The only thing that comes to my mind is that xlookup function accepts the array of data, so I can't use Value function by passing array into it. But still, if I change my formula manually, it works well