Write Excel

//Create excel file
File file = new File("Write Excel.xls");

WritableWorkbook workbook = Workbook.createWorkbook(file);
//Create sheet
WritableSheet sheet = workbook.createSheet("Sheet", 0);
//Write Text (column, row, text to write)
Label label = new Label(0, 0, "MDSaputra");

//Write Number
for (int i=0;i<10;i++)
    //(column, row, number to write)
    Number number = new jxl.write.Number(0, i+1, i);


Read Excel

//filePath is String xls file location
File file = new File(filePath);

Workbook workbook = Workbook.getWorkbook(file);
Sheet[] sheet = workbook.getSheets();

int x = sheet[0].getRows();
int y = sheet[0].getColumns();
for (int i = 0; i < x; ++i){
    for (int j = 0;j < y; ++j){
        String ret = sheet[0].getCell(j, i).getContents();
        System.out.println("cell : "+i+" , "+j+" : "+ret);

NB : You need jxl library to use code above, you can download it here or find with your favorite search engine.