title: Reading and writing from xls and xlsx excel file in java using Apache POI
body: <p>I am writing a program which needs to read and write from excel files, irrespective of the format(xls or xlsx).</p>
  
  <p>I am aware of the Apache POI, but it seems it has different classes to handle xls file(HSSF) and xlsx(XSSF) files.</p>
  
  <p>Anyone aware of how I might achieve what I am trying to do here.
  (Ideas for using an API other than POI are also welcome).</p>