Adding Date support to POIUtil.cfc when reading excel sheets
Posted by
Luis Majano
Oct 01, 2007 00:00:00 UTC
The POIUtil.cfc by Ben Nadel is a great wrapper to the Apache POI project. I am using it in a current project and have come to certain caveats that I needed to extend the library. Ben, hope you are reading, I sent you an email with the update.
Anyways, to sum up the problem
Excel stores dates as numbers therefore the only way to determine if a cell is actually stored as a date is to look at the formatting.
Enter a little digging in the docs and the API and you find the famous HSSFDateUtil class. This class contains a bundle of static methods for you to check and validate date formatting in excel.
Tags: ColdFusion
sana
Hi Luis, I did date-function in POI and forward to Ben long time ago, but seems to be he is busy never updated POI.
Anyway thanks for sharing this info with CF community.
Ben Nadel
Hey guys, this stuff looks good. Sana, I still have your email in my inbox :) I just can't seem to get around to it - I am sorry. I have about 3 updates in the queue for the POI stuff and then I also want to do some overhaul on it as well.
I will try and make this a priority this week. Thanks for all of your feedback!