Can i save data in different sheets of same csv ?
I am having some data, where i need to save data in different sheets based on my custom filter. how can i achieve with this package?
Hi,
AFAIK, CSV format doesn't support multiple sheets per file. So it's not a limitation of this library but a limitation of the format itself.
I assume that what you want is that each sheet goes to its own CSV file, correct? For that, I'd recommend that you filter your JSON array and then call multiple times json2csv to produce multiple CSV files. That's trivial to do using node.js. Using the CLI might be a bit more challenging but nothing that can't be achieved by using a JSON parser like jQ.
Please close the issue if this answers your questions or let me know if there is anything else that I can help you with.
I'll close this since I think that my response answers your question. Feel free to reopen if you think that there is anything else that we could do 🙂