Closed rzhov closed 1 year ago
Hi @rzhov,
This is documented here: https://juanjodiaz.github.io/json2csv/#/others/known-gotchas?id=avoiding-csv-injection
Although the documentation is a bit old. I will rewrite it when I have some time.
Basically you need to use the excelString
formatter (see https://juanjodiaz.github.io/json2csv/#/advanced-options/formatters?id=string-excel)
The excel strings wraps every cell's data in ="<cell_data>"
so Excel interprets correctly the content as a string regardless of characters that could be interpreted in other way.
The solution used by json-2-csv
is simply incorrect as it removes characters from the cell's content.
Closing s this was responded. Please let me know if there is anything else that you are unsure about.
Problem is exactly the same as was described here for the similar lib
json-2-csv
v3.x https://github.com/mrodrig/json-2-csv/issues/209Is
preventCsvInjection
option available for thisjson2csv
lib v7.0.x ? Project documentation completely misses this part.