2

Is it possible to throw exception when the expected header fields are not present in csv file, while parsing it via univocity parser

Priya
  • 1,096
  • 4
  • 15
  • 32

1 Answers1

2

Are you processing the file into java beans? If that is the case, on your BeanProcessor instance, call setStrictHeaderValidationEnabled(true) and it will validate the input headers against the fields annotated with the @Parsed annotation.

Jeronimo Backes
  • 6,141
  • 2
  • 25
  • 29