> I'm using the poi library (the one that comes with CF10) directly to create
> an excel spreadsheet, and one of our users has complained about the
> currency data.  It shows up properly like $5.71, but sometimes the actual
> data in the cell is 5.710000059 or something like that.
>
> Here's the code I'm using the write the cell data:
>
> cell.setCellValue( javacast("float",
> NumberFormat(qry[fieldNames[x]][i],'0.00')) );
>
> I'm guessing this is coming from casting it to float, but I'm not sure what
> else to do here.

I'm guessing it's coming from the specific mask you've put in, but
honestly if you want to represent it as currency you'd need to lose
all those other digits. What does the user want to do?

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355862
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to