You can use the IsInstanceOf() function in CF8+ to do this, but you would need the full package classname of XSSFWorkbook, for example:
<cfif IsInstanceOf(wb, "com.example.XSSFWorkbook")> ... </cfif> Pete Freitag http://foundeo.com/ - ColdFusion Consulting & Products http://petefreitag.com/ - My Blog http://hackmycf.com - Is your ColdFusion Server Secure? On Fri, Jan 29, 2010 at 2:26 PM, <b...@bradwood.com> wrote: > > At the risk of making several assumptions.... > > if(getmetadata(wb).name == 'XSSFWorkbook') file += "x"; > > ~Brad > > -------- Original Message -------- > Subject: CF Equivalent of JAVA code. > From: "DURETTE, STEVEN J (ATTASIAIT)" <sd1...@att.com> > Date: Fri, January 29, 2010 12:50 pm > To: cf-talk <cf-talk@houseoffusion.com> > > > Hi All, > > > I'm trying to do some work and I have some java examples. For the most > part I can easily convert to CF, but I'm not sure how to convert this: > > > > If(wb instanceof XSSFWorkbook) file += "x"; > > > I don't know how to check if wb is an instance of XSSFWorkbook. Wb > could be XSSFWorkbook or HSSFWorkbook. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330277 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4