There is no direct interface to get that information, and I'm not sure why you would.
But looking at the Java API For Office 1.1 you find that
- Office.select() is only supported by Word and Excel
- Document.getFileAsync() is only supported by Powerpoint and Word.
So by testing these two for success/failure you can decide that your host is Excel or Word.
Alternatively, you can loop through the script tags to see whether the document includes excel-xy.js
or word-xy.js
.