go-the-way / exl

Excel binding to struct written in Go.(Only supports Go1.18+)
Other
30 stars 9 forks source link

feat: Allow ignoring fields when writing files #13

Closed oliverkahrmann-basf closed 6 months ago

oliverkahrmann-basf commented 6 months ago

Changes write configuration processing to always run, even it, even if the provided data is empty. If not done this way, empty files could have different headers compared to files with content, because the write config would not run.

Adds a write configuration IgnoreFieldsWithoutTag, which defaults to false, so the previous behaviour. If set to true, any fields which don't specify a tag (default excel) are not written to the output file.