title: xlsx reading through apache poi
body: <p>I just need to select a XLSX file from my sd card and read it through apache poi. here is my intent call to sd card and choose the xlsx file</p>
  
  <pre><code>        Intent intent = new Intent();
          intent.setType("*/*");
          intent.setAction(Intent.ACTION_GET_CONTENT);
          startActivityForResult(Intent.createChooser(intent, "Complete action using"), PICK_FROM_FILE);
      }
  </code></pre>
  
  <p>Here is code for receiving the path of selected .xlsx file here is the error generating i think its on calling the workbook but i cant clear it</p>
  
  <pre><code>    public void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
      if (requestCode == PICK_FROM_FILE &amp;&amp; resultCode == RESULT_OK) {
  
  
         // File file = new File(Environment.getExternalStorageDirectory(), data.getData().toString());
          Uri path =data.getData();
          ContentResolver cr=this.getContentResolver();
          File fpath=new File(path.toString());
  
  
          try {
              //imputStream
              InputStream myfile=cr.openInputStream(path);
              Log.e("myapp","here");
              //Workbooh
              Workbook wrk=new HSSFWorkbook(myfile);
  
  
              //sheet
              Sheet firstsheet=wrk.getSheetAt(0);
  
              //RowIterator
              Iterator&lt;Row&gt; iterator=firstsheet.iterator();
              while(iterator.hasNext())
              {
                  Row next=iterator.next();
  
                  //CellIterator
                  Iterator&lt;Cell&gt; cellIterator=next.cellIterator();
                  while(cellIterator.hasNext())
                  {
                      Cell cell=cellIterator.next();
  
                      switch (cell.getCellType())
                      {
                          case Cell.CELL_TYPE_STRING:
                              Toast.makeText(getApplicationContext(),cell.getStringCellValue()+" ",Toast.LENGTH_SHORT).show();
                              break;
                          case Cell.CELL_TYPE_NUMERIC:
                              Toast.makeText(getApplicationContext(),cell.getNumericCellValue()+" ",Toast.LENGTH_SHORT).show();
                      }
                  }
  
              }
  
  
          } catch (FileNotFoundException e) {
              e.printStackTrace();
          } catch (IOException e) {
              e.printStackTrace();
          }
  
  
      }
  
  
      }
  </code></pre>
  
  <p>my error list given below</p>
  
  <pre><code> 04-26 12:18:17.067 2736-3126/? E/Watchdog: !@Sync 1540 [04-26 12:18:17.069]
   04-26 12:18:47.067 2736-3126/? E/Watchdog: !@Sync 1541 [04-26 12:18:47.072]
   04-26 12:19:17.067 2736-3126/? E/Watchdog: !@Sync 1542 [04-26 12:19:17.073]
   04-26 12:19:47.072 2736-3126/? E/Watchdog: !@Sync 1543 [04-26 12:19:47.075]
   04-26 12:20:17.072 2736-3126/? E/Watchdog: !@Sync 1544 [04-26 12:20:17.076]
  </code></pre>
  
  <p>thanks for help in advance.....</p>