Not hidden apostrophe in Excel cell on NPOI generated xlsx

31 Views Asked by At

I'm using C# and NPOI library for generating excel files. Currently I'm trying to prevent formula injection adding apostrophe in the beginning of each cell starting with =, +, -, @, etc.

The issue is that the generated xlsx file shows the apostrophe in the cell (normally if you add it directly using Excel it is hidden and you can see it only in the formula bar). (https://i.stack.imgur.com/nhG87.png)

Do you have any suggestions how to achieve this hidden apostrophe?

0

There are 0 best solutions below