Definitely good to know.  I'm hoping that when I'm done with the changes
to a cfc I'm working on it will be backward compatible all the way to
CFMX.  We have a lot of different versions throughout the company and it
would be nice if we had one cfc for all/most of them.

Maybe in the future I'll use that for CF8 and after!

Thanks,
Steve

-----Original Message-----
From: Pete Freitag [mailto:pfrei...@gmail.com] 
Sent: Friday, January 29, 2010 2:49 PM
To: cf-talk
Subject: Re: CF Equivalent of JAVA code.


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:330278
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to