On Mon, 17 Feb 2014, Rajkumar Balakrishnasamy wrote:
How can we check whether given type document is MS office Excel 95 or 97.Is there any tools are available? or how to check given doc version in MS Office or OpenOffice.

It's a little hacky, but you could just try to open it with HSSFWorkbook. If it opens, it's 97. If it gives an OldFileFormatException it's 95 (or older). If it gives OfficeXmlFileException it's an OOXML file

If you want something standalone, look at the code which throws those exceptions, and implement similar logic

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to