poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoni Mylka <antoni.my...@gmail.com>
Subject Re: How to check for valid excel files using POI without checking the file extension
Date Mon, 19 Apr 2010 12:01:55 GMT
W dniu 2010-04-19 13:49, James Geroge pisze:
> Hi Friends,
> Is there a way to know the file is an excel file without manipulating the
> file extension, as the users can send the excel files in format like below.
> Test
> Test.xls
> Test.xlsx
> Test.xlsxxlsx(by renaming the file using windows explorer)
> Test.xlsabcd (by renaming

You can use a mime type identifier. Nice ones are in the Aperture 
Framework (disclaimer: I'm Aperture's maintainer :) ) or in Apache Tika.

AFAIK Apache Tika's is better at recognizing xlsx files if the extension 
is missing, at least at the moment. We're working on it too.

Antoni Mylka

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message