CsvHelper
CsvHelper copied to clipboard
Mapping Collection Header Names
Using ClassMap on a collection doesn't allow me to set different header values for the items in the list.
What I would like is to be able to pass an array to the Map Name method and have all of the values used before Column1,Column2,etc. The reason I want to do this is that I have a fixed, during write, but variable number of values to export. This would make the process of configuring the csv file much easier.
The only alternative is to manually write out the header values myself (see: https://stackoverflow.com/a/67979692/1728700) and that means that maintaining the class map and the headers are done in different places.