Menu

Incorrect XLS generated by XLCRT

FAQ
Bichel
2005-10-20
2013-03-26
  • Bichel

    Bichel - 2005-10-20

    Installed XLNEW for V5R3.
    Created a simple testfile
    R XLTESTR                                        
      XLTNUMS30      3S 0       TEXT('Keyfield S 3,0')
      XLTTEXT50     30          TEXT('Text 30')      
      XLTNUMP30      3  0       TEXT('Numeric P 3,0')
      XLTNUMP92      9  2       TEXT('Numeric P 9,2')
      XLTNUMS92      9  2       TEXT('Numeric S 9,2')
                                                     
    K XLTNUMS30

    the resulting xls (partially) shows:

    XLTNUMS30    XLTTEXT50
    ,1                    TEST1 

    seems to be a problem with numerics.                      

                                          

     
    • Bichel

      Bichel - 2005-10-20

      Problem solved.
      Error was in
      TempStr = new_String(',0'); 
      now changed to
      TempStr = new_String('#,##0');

      Changes made for all the other statements with formatting string.

      Seems to come from some convert when installing and the source for XLCRT.

                           
       

       
    • leguar

      leguar - 2005-10-20

      That's a know problem, using some special US characters. Here in Denmark # will be translated to , therefore I have had the same problem.

      Tommy is aware of this problem, and I'm working on a solution.

      Btw: here are the formatting codes for HSSF_CellStyle:
      0, "General"
      1, "0"
      2, "0.00"
      3, "#,##0"
      4, "#,##0.00"
      5, "($#,##0_);($#,##0)"
      6, "($#,##0_);[Red]($#,##0)"
      7, "($#,##0.00);($#,##0.00)"
      8, "($#,##0.00_);[Red]($#,##0.00)"
      9, "0%"
      0xa, "0.00%"
      0xb, "0.00E+00"
      0xc, "# ?/?"
      0xd, "# ??/??"
      0xe, "m/d/yy"
      0xf, "d-mmm-yy"
      0x10, "d-mmm"
      0x11, "mmm-yy"
      0x12, "h:mm AM/PM"
      0x13, "h:mm:ss AM/PM"
      0x14, "h:mm"
      0x15, "h:mm:ss"
      0x16, "m/d/yy h:mm"

      // 0x17 - 0x24 reserved for international and undocumented 0x25, "(#,##0_);(#,##0)"
      0x26, "(#,##0_);[Red](#,##0)"
      0x27, "(#,##0.00_);(#,##0.00)"
      0x28, "(#,##0.00_);[Red](#,##0.00)"
      0x29, "_(*#,##0_);_(*(#,##0);_(* \"-\"_);_(@_)"
      0x2a, "_($*#,##0_);_($*(#,##0);_($* \"-\"_);_(@_)"
      0x2b, "_(*#,##0.00_);_(*(#,##0.00);_(*\"-\"??_);_(@_)"
      0x2c, "_($*#,##0.00_);_($*(#,##0.00);_($*\"-\"??_);_(@_)"
      0x2d, "mm:ss"
      0x2e, "[h]:mm:ss"
      0x2f, "mm:ss.0"
      0x30, "##0.0E+0"
      0x31, "@" - This is text format.
      0x31 "text" - Alias for "@"

      I'll try to make them work here in Europe, but pls. give me some time :-)
       

       

Log in to post a comment.

MongoDB Logo MongoDB