import org.apache.poi.hssf.usermodel.*;

import java.io.*;
import java.util.*;

public class apacheexcelC
{
public static void main(String arg[])
{    
try {
    FileInputStream inputStr = new FileInputStream("DATA1.xls");
    Workbook Work = new HSSFWorkbook();
    Workbook Work = new Workbook(inputStr) ;
    Sheet sheet1 = Work.getSheetAt(0);
    Iterator rowItr = sheet1.rowIterator();
    while ( rowItr.hasNext() ) {
        Row row = (Row) rowItr.next();
        System.out.println("ROW:-->");
        Iterator cellItr = row.cellIterator();

        while ( cellItr.hasNext() ) 
        {
            Cell cell = (Cell) cellItr.next();
            System.out.println("CELL:-->"+cell.toString());
        }
    }
} catch (Exception e) {
    e.printStackTrace();
}
}
}