tags:

views:

14

answers:

0

I have an app that takes excel files as input. Currently, it supports older excel files through the package hssf of the apache poi library.

This library can handle excel 2007 files too, through the use of the xssf package.

My question is : if you receive a file, knowing that you cannot be sure if the file extension (xls or xlsx) is right, how do you differentiate between those two types of files ?