title: How to get the max no. of columns filled in an XLSX file using POI?
body: <p>I know we can get the max number of columns by iterating over all the rows and calling <code>getLastCellNumber</code> on each row object.. but this approach requires iterating over all the rows which I want to avoid since it will take lot of time for files with a million rows(that’s the kind of files I am expecting to be read). </p>
  
  <p>When POI reads a excel file, it stores the sheet dimensions (first row number, last row number , first col number, last col number) in an object of the <code>DimensionsRecord</code> class. So if I get this object I will get what I need. These objects can be obtained from the Sheet class which is an inner class of POI. I was able to extract what I need for XLS files, but I have hit a roadblock for XLSX files.</p>
  
  <p>Does POI maintain <code>DimensionsRecord</code> object for XLSX also?, if yes has anybody tried to extract it? Or Is there some other by which this can be done?? please help! </p>
  
  <p>Also I wanted to ask, whether my approach is correct or not, i.e I am using the inner classes of POI (it is getting my work done), is this correct or should I solely rely on exposed APIs (too time consuming).</p>