You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
I have different beans which I used while writing data to CSV. I have extended the ColumnPositionMappingStrategy class and customized the mapping strategy. I have annotated all my beans with @CsvBindByName and @CsvBindByPosition. Everytihing is working fine till now. Now the problem arises when I try to ignore some of the bean fields based on some condition. Those fields are not coming as part of CSV when my condition satisfies but the csv file contains the empty column. How can I solve this problem. Please help if possible.
As per opencsv 5.1 we can use MappingStrategy.ignoreFields() if we want to ignore some fields and also it is mentioned that it must be used before mappingStrategy.setType(). I have used it same way but I could see empty columns in my generated CSV file.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have different beans which I used while writing data to CSV. I have extended the ColumnPositionMappingStrategy class and customized the mapping strategy. I have annotated all my beans with @CsvBindByName and @CsvBindByPosition. Everytihing is working fine till now. Now the problem arises when I try to ignore some of the bean fields based on some condition. Those fields are not coming as part of CSV when my condition satisfies but the csv file contains the empty column. How can I solve this problem. Please help if possible.
As per opencsv 5.1 we can use
MappingStrategy.ignoreFields()
if we want to ignore some fields and also it is mentioned that it must be used beforemappingStrategy.setType()
. I have used it same way but I could see empty columns in my generated CSV file.The text was updated successfully, but these errors were encountered: