You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Feris Thia <fe...@gmail.com> on 2006/09/09 11:01:00 UTC

Validate Document

Dear All,

Can I use POI API to validate whether it is a valid Word, Excel, Powerpoint
document ?? If I can, what API should I use ?

Regards,

Feris

Re: Validate Document

Posted by Nick Burch <ni...@torchbox.com>.
On Sat, 9 Sep 2006, Feris Thia wrote:
> Can I use POI API to validate whether it is a valid Word, Excel, 
> Powerpoint document ?? If I can, what API should I use ?

Can you not just try and open it with the appropriate handler (eg 
HSLFSlideShow for powerpoint), and see if any exceptions are thrown? If 
you don't get any, there's a fair chance it's a valid document

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/