import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
HSSFSheet sheet;
POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream("plik.xls"));
HSSFWorkbook wb = new HSSFWorkbook(fs);
sheet = wb.getSheetAt(0);
HSSFRow row = sheet.getRow(0);
int i = 0;
while (sheet.getRow(i) != null) {
System.out.println("" + sheet.getRow(i).getCell(0).toString());
i++;
}