title: Reading data from xlsx with Apache POI's SXSSFSheet
body: <p>I want to read data ( cell values ) from a certain xlsx file using apachi poi. 
  The code below creates the <code>SXSSFWorkBook</code> instance successfully and assigns db.xlsx ( my dummy xlsx). I have tried changing sheet numbers and double checking it with the <code>getSheetNumber</code> method to make sure the workbook is correctly assigned.</p>
  
  <p>Next I want to assign a specific sheet (index <code>0</code> with name <code>main</code>) to <code>SXSSFSheet</code> instance, but currently it returns <code>null</code>. (I have both tried <code>getSheetAt</code> and <code>getSheet</code> methods).</p>
  
  <pre><code>SXSSFRow DummyRow;
  SXSSFCell DummyCell;
  
  int RowCount;
  OPCPackage pkg = OPCPackage.open(blabla string adress);
  
  XSSFWorkbook wb = new XSSFWorkbook(pkg);
  Workbook MainBook = new SXSSFWorkbook(wb,100);
  
  int a = MainBook.getNumberOfSheets();
  
  SXSSFSheet MainSheet = (SXSSFSheet) MainBook.getSheetAt(0); 
  RowCount = MainSheet.getLastRowNum();
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Edit:</p>
  
  <p>I have tried <code>getSheetName</code> method and had a positive result. So the problem is with reaching rows in Worksheet. so, the last line <code>getLastRowNum()</code> is not working.</p>