poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 42630] New: - Excel : isInternalDateFormat
Date Mon, 11 Jun 2007 06:45:21 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42630>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42630

           Summary: Excel :  isInternalDateFormat
           Product: POI
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P1
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: sankar.laks@gmail.com


I am using Microsoft excel 2003. I have a date formated cell in the
sheet(14/06/1941 ENGLISH UK format). When i debugged the value of the
HSSFCellStyle.getDataFormat is 198 . But in the method isInternalDateFormat it
fails. But if i add 198 to the check list, it succeeds.

 /**
  * given a format ID this will check whether the format represents
  * an internal date format or not. 
  */
 public static boolean isInternalDateFormat(int format) {
   boolean retval =false;

         switch(format) {
             // Internal Date Formats as described on page 427 in
             // Microsoft Excel Dev's Kit...
             case 0x0e:
             case 0x0f:
             case 0x10:
             case 0x11:
             case 0x12:
             case 0x13:
             case 0x14:
             case 0x15:
             case 0x16:
             case 0x2d:
             case 0x2e:
             case 0x2f:
             case 198:
                 retval = true;
                 break;
                 
             default:
                 retval = false;
                 break;
         }
    return retval;
 }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message