Is your feature request related to a problem? Please describe.
I sometimes enhance the output of CsvHelper csv files I create using CsvWriter by creating an Excel file from that csv file.
Describe the solution you'd like
A property on ClassMap called DataModel of type ClassMapDataModel that effectively represents the object model WriteRecord uses.
A method on ClassMapDataModel called GetIndexOf(string name) that would return the index of a column.
For the DataModel to work when using MemberMap, ParameterMap and ReferencesMap items - especially MemberMap and ReferencesMap.
Describe alternatives you've considered
Read in the first line of the generated file, and split it by ','. This is not great for many reasons I don't think we need to discuss, lol.
var indexOfQtyColumn = File.ReadLines(csvPath).FirstOrDefault().Split(',')
.Select((value, index) => new { value, index})
.Where(pair => pair.value.Contains("Qty"))
.Select(pair => pair.index)
.FirstOrDefault();
Additional context
I was actually surprised to read the docs carefully and notice References says its for Internal Use Only. I've been using this feature a ton, so I hope it continues to remain public.
Is your feature request related to a problem? Please describe. I sometimes enhance the output of CsvHelper csv files I create using CsvWriter by creating an Excel file from that csv file.
Describe the solution you'd like
Describe alternatives you've considered Read in the first line of the generated file, and split it by ','. This is not great for many reasons I don't think we need to discuss, lol.
Additional context I was actually surprised to read the docs carefully and notice References says its for Internal Use Only. I've been using this feature a ton, so I hope it continues to remain public.