I am using POI Version 3.6. and i am reading excel files using POI.
But is there anyway i can identify the version of excel file. because sometime .xls extension also needs XSSF as they are using the features of office 2007.
Do you really need to know what format it is? The classes in the org.apache.poi.ss.usermodel package can handle both file formats.
If you do, try reading the file as a ZIP file (which the Office 2007 formats actually are) using the classes in java.util.zip; if you get an exception, then it's a binary (pre-office 2007) file.