Skip to content

cc.write<> should ignore extraneous data in class #55

@burningbaal

Description

@burningbaal

Though it seems this project is under-maintained lately, I want to suggest an addition:
Either via a decorator (ie: [CsvColumn(Name = "extra_data", FieldIndex = null)] or, probably better, via the fileDescription (ie: IgnoreExtraClassData = true), extra data in the class should not be written to the file upon cc.write<>

I have a helper class that interprets a string from particular columns to implement a custom sort algorithm (for well position addresses in 96-well microtiter plates, FYI), so in addition to the column data (column header = DestWellId), I had an object called DestWell which properly interpreted the meaning of the string and implemented a comparer method for sorting. However, when I called cc.write<>, it always wrote these DestWell objects as new columns (at the right-side of the file), and it seems there was nothing I could do to avoid it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions