3

Apache Commons CSV provides method to pass Header columns with withHeaders(). But is there a way to pass a specific row index as header row to Apache Commons. I have gone through the docs but have not found anything.

Rama Arjun
  • 273
  • 2
  • 3
  • 15
  • My read of the documentation is the same as yours. It looks like it is meant for reading single-table-csvs. I'm curious why you would need to read a different row other than the first one as the headers, though. – buggaby Sep 18 '18 at 17:22

1 Answers1

0

I came across needing this kind of feature, but Apache Commons CSV doesn't have that. But however, I achieved it by removing all the garbage rows before the header row, so that the header becomes the first row.

itsChathurangaJ
  • 49
  • 1
  • 1
  • 11