Generate CSV File

0 Comments

In this post, we will use printwriter library to export data to csv file.

// Create file
File file = new File("product_export.csv");
// open and close printwriter by try catch
try(PrintWriter print = new PrintWriter(file)){
    // print data here

}
catch(Exception e){
    // log error here
}

View the video for more detail:


Leave a Reply

Your email address will not be published. Required fields are marked *