Create an Excel(.xlsx) file using POI

Here I am giving a very basic example for creating a basic .xlsx file using poi.jar. This code will create a .xlsx file in a certain location & write some text in it. But we need to use a number of jars for that.
They are -

i) dom4j-1.5.1.jar
ii) ooxml-schemas-1.0.jar
iii) poi-3.5-FINAL.jar
iv) poi-ooxml-3.5-FINAL.jar
v) xmlbeans-2.3.0.jar

Convert from Milliseconds to Date


Here is the code for how to converting any milliseconds to date.
 
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;


public class ConvertMiliSecondToDate {

 public static void main(String[] args) {
  long milliSeconds = 1384275600000L; //Enter any value
        // change the date format as per your requirement
        DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
  Calendar calendar = Calendar.getInstance();
  calendar.setTimeInMillis(milliSeconds);
  System.out.println(formatter.format(calendar.getTime())); 
 }

}
The Output should be : 13/11/2013 18:45:30


Happy Learning!!