Reputation: 523
Language: C#
I want to output my data in a csv file. The data retrieval and display is working already but is it possible to display data per group in a separate TAB when user opens the CSV?
Right now, I am using a 'comma' as a separator and my data looks like this when I open the CSV:
What I wanted to accomplish is for the second group of data under "Name" and Gender" to be output in a separate tab for example:
So in the end, first tab is for the NAME and AGE. Second tab is for the NAME and GENDER. Is this feasible to achieve? Thank you.
Upvotes: 0
Views: 2226
Reputation: 152606
No, you cannot create multiple "sheets" within a pure CSV file. Tabs are an Excel-only concept and are not part of most raw file formats.
I would recommend using Office interop or a third-party library to generate native excel documents,
Upvotes: 3