I'm writing using StatefulBeanToCsvBulder. The file format requires that the header have file meta-data, rather than columns. There are 3 bean types.
StatefulBeanToCsv headerCsvBuilder = new StatefulBeanToCsvBuilder(writer)
.withThrowExceptions(false)
.withOrderedResults(false)
.build();
headerCsvBuilder.write(outputHeader);
StatefulBeanToCsv csvBuilderTransactions = new StatefulBeanToCsvBuilder(writer)
.withThrowExceptions(false)
.withOrderedResults(false)
.build();
csvBuilderTransactions.write(samplesList);
How do I output this without printing a header each time?
Put the annotation
@CsvBindByPosition(position = 0)
On the bean being serialised.