I'm using csvWriter, the code i'm using it works. Is It possible create a csv with multiple pages, like Excel files?
Here you are the specifics about the project.
List<BookEvent> listBooks = new ArrayList<BookEvent>();
for (ExaClass examp : examps) {
listBooks.add(new BookEvent(examp.getExample(), examp.getExample2(), examp.getExampleN()));
}
String filename = UUID.randomUUID().toString();
FileWriter file = new FileWriter(filename);
ICsvBeanWriter csvWriter = new CsvBeanWriter(file,
CsvPreference.STANDARD_PREFERENCE);
String[] header = {"Example1", "Example2", "ExampleN"};
csvWriter.writeHeader(header);
header = new String[]{"example1", "example2", "exampleN"};
for (BookEvent aBook : listBooks) {
csvWriter.write(aBook, header);
}
csvWriter.close();