asafdav / ng-csv

Simple directive that turns arrays and objects into downloadable CSV files
MIT License
573 stars 215 forks source link

Header relating to a nested array should have col span applied #63

Closed digitalgears closed 9 years ago

digitalgears commented 9 years ago

If I have the following data

[
  {
    id: 123,
    name: "some name"
    desc: "lorem ipsum"
    data: [1,2,3,4,5,6]
  }
.......
]

and then I specify csv-header="['Event ID', 'Question', 'Description', 'Answers']"

I would expect the exported csv to have a header 'Answers' which spans data.length columns. i.e. all the data sits under a single heading.

asafdav commented 9 years ago

I don't think it's trivial nor intuitive.