Microsoft KB Archive/147942

= Microsoft Excel's Internal Format Table Doc Has Errors =

Article ID: 147942

Article Last Modified on 8/15/2003

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition
 * Microsoft Excel Software Development Kit 5.0

-



This article was previously published under Q147942



5.00   | 5.00 WINDOWS | WINDOWS NT kbprg kbdocerr



SYMPTOMS
On page 251 of the Microsoft Excel Developer's Kit 5.0 documentation for the XF record indicates that the six-byte offset should be an index to a FORMAT record. However, if you were to look at an actual XF record in a Microsoft Excel-generated BIFF file, you would most likely see that the index numbers do not seem to reconcile with the existing FONT table.



CAUSE
In Microsoft Excel versions prior to 5.0, all number format information was included with the Binary Interchange File Format (BIFF) file in FORMAT records. These FORMAT records were stored together in the BIFF file and could be reached by providing an index number to the correct FORMAT record as part of the XF record.

Starting with Microsoft Excel version 5.0, many of the built-in number formats were moved to an internal table and are no longer saved with the file as FORMAT records. These number formats are still reached by providing an index into the table as part of the XF record. However, the internal number format table is not documented within the Microsoft Excel Developer's Kit version 5.0.



RESOLUTION
The following table lists all the number formats that are now maintained internally within Microsoft Excel. The index number to the format table precedes the format description. Note that 0x17 through 0x24 are reserved for international versions and are undocumented at this time.

Index    Format String - 0x00     General 0x01     0 0x02     0.00 0x03     #,##0 0x04     #,##0.00 0x05     ($#,##0_);($#,##0) 0x06     ($#,##0_);[Red]($#,##0) 0x07     ($#,##0.00_);($#,##0.00) 0x08     ($#,##0.00_);[Red]($#,##0.00) 0x09     0% 0x0a     0.00% 0x0b     0.00E+00 0x0c     # ?/? 0x0d     # ??/?? 0x0e     m/d/yy 0x0f     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 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     @

