Add a toBuilder method to do: CSVFormat format = CSVFormat.EXCEL.toBuilder().withHeader("Col1", "Col2", "Col3").build(); Instead of: CSVFormat format = CSVFormat.newBuilder(CSVFormat.EXCEL).withHeader("Col1", "Col2", "Col3").build();