0

How to achieve this concept based on generating CSV in case of:

  • Ignoring field that am not interested in (Could be obtain in OpenCSV based on MappingStrategy)
  • Order columns from the list My entity consist of 14 variables (id, number, surname...), for ignoring specific files i used new StatefulBeanToCsv.withMappingStrategyand it works properly, but additionaly i have f.e List of Fields/String that correspond to my entity, but generated csv should be exactly same ordered like list.

How to achieve this in OpenCSV, alternetively it could be any other lib

cfrick
  • 35,203
  • 6
  • 56
  • 68
Snopek1337
  • 13
  • 4
  • Implement a custom `MappingStrategy`. [This](https://stackoverflow.com/questions/45203867/opencsv-how-to-create-csv-file-from-pojo-with-custom-column-headers-and-custom) can get you started – XtremeBaumer May 13 '22 at 10:00
  • Does this answer your question? [OpenCSV: How to create CSV file from POJO with custom column headers and custom column positions?](https://stackoverflow.com/questions/45203867/opencsv-how-to-create-csv-file-from-pojo-with-custom-column-headers-and-custom) – Tatu Lund May 13 '22 at 10:02

0 Answers0