Dan, Great - I was wondering when I'd find the time, Bill. ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 13, 2002 11:15 AM Subject: Re:Date/Time Formats: Spec is subset of product
> Bill, > > I submitted a patch last week mainly to fix date conversions from > Workbooks using 1904 date windowing. In that patch I also added about a > dozen new date formats to the HSSFDateUtil.isInternalDateFormat(int) > method. I think all those you list are there. You can keep an eye on > whether the patch is accepted (and vote for it if you wish) here: > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14375 > > Dan > > > > >Date: Tue, 12 Nov 2002 22:02:20 -0700 > >From: Bill Winspur <[EMAIL PROTECTED]> > >Subject: Date/Time Formats: Spec is subset of product > >To: Poi user list <[EMAIL PROTECTED]> > > > >HSSFDateUtil.isCellDateFormatted() refers to the Excel Dev's Kit > >as the authority for its list of built in date and time formats. > >However the excel product seems to have moved on, my copy shows > >about 19 formats in its cell formatting dialog box, and does not > >have any obvious way to add more formats. > > > >The result is, isCellDateFormatted() fails for some legitimate > >xcel date/time strings. > > > >I made an xls that used all formats (I may have missed one) on > >the same date/time and then used HSSF to dump out the format > >indices xcel uses, as shown here in rows 3-13 and 15-22. > > > >=========================== START testAnalyseXcelDateFormats > >. row[0] , cell 0: null > >. row[1] , === not numeric === > >. row[2] , === not numeric === > >. row[3] , col 0, built-in format: e , m/d/yy > >. row[4] , col 0, outside XDK spec a5 > >. row[5] , col 0, built-in format: 10 , d-mmm > >. row[6] , col 0, built-in format: f , d-mmm-yy > >. row[7] , col 0, outside XDK spec a6 > >. row[8] , col 0, outside XDK spec a7 > >. row[9] , col 0, outside XDK spec a8 > >. row[10], col 0, outside XDK spec a9 > >. row[11], col 0, built-in format: 16 , m/d/yy h:mm > >. row[12], col 0, outside XDK spec aa > >. row[13], col 0, outside XDK spec ab > >. row[14], === not numeric === > >. row[15], col 0, built-in format: 14 , h:mm > >. row[16], col 0, built-in format: 12 , h:mm AM/PM > >. row[17], col 0, built-in format: 15 , h:mm:ss > >. row[18], col 0, built-in format: 13 , h:mm:ss AM/PM > >. row[19], col 0, built-in format: 2f , mm:ss.0 > >. row[20], col 0, built-in format: 2e , [h]:mm:ss > >. row[21], col 0, outside XDK spec a9 > >. row[22], col 0, built-in format: 16 , m/d/yy h:mm > >=========================== EXIT testAnalyseXcelDateFormats > > > >Since xcel has a fixed number of time/date formats, all > >uniquely id'd by dataformat indexes, why not just extend the list > >in HSSFDateUtil.isCellDateFormatted() to recognize them ? > > > >Bill. > > -- To unsubscribe, e-mail: <mailto:poi-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:poi-user-help@;jakarta.apache.org>
