Search Java Code Snippets

  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.

#Java - Code Snippets for '#Readinf xls' - 1 code snippet(s) found

 Sample 1. Load XLS file and print first column using poi XSSFWorkbook

public XSSFWorkbook loadXLSAndPrintFirstColumn(File xlsFile) {
   InputStream inputStream = null;
   try {
      inputStream = new FileInputStream(xlsFile);
   XSSFWorkbook xssFWorkbook = new XSSFWorkbook(inputStream);
      Sheet sheet = workbook.getSheetAt(workbook.getActiveSheetIndex());
      for (int index = 0; index < sheet.getPhysicalNumberOfRows(); index++) {
      try {
         Row row = sheet.getRow(index);
      } catch (Exception e) {


   Like      Feedback     readinf xls  reading excel  apache poi  XSSFWorkbook  InputStream

Subscribe to Java News and Posts. Get latest updates and posts on Java from
Enter your email address:
Delivered by FeedBurner