07.05.2014 Views

The Microsoft Excel File Format - OpenOffice.org

The Microsoft Excel File Format - OpenOffice.org

The Microsoft Excel File Format - OpenOffice.org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5 Worksheet/Workbook Records<br />

5.49 FORMAT<br />

BIFF2 BIFF3 BIFF4 BIFF5 BIFF8<br />

001E H 001E H 041E H 041E H 041E H<br />

This record contains information about a number format. All FORMAT records occur together in a sequential list.<br />

In BIFF2-BIFF4 other records referencing a FORMAT record contain a zero-based index into this list. From BIFF5 on<br />

the FORMAT record contains the index itself that will be used by other records.<br />

Record FORMAT, BIFF2-BIFF3:<br />

Offset Size Contents<br />

0 var. Number format string (byte string, 8-bit string length, ➜2.5.2)<br />

Record FORMAT, BIFF4-BIFF5:<br />

Offset Size Contents<br />

0 2 BIFF4: Not used<br />

BIFF5: <strong>Format</strong> index used in other records<br />

2 var. Number format string (byte string, 8-bit string length, ➜2.5.2)<br />

Record FORMAT, BIFF8:<br />

Offset Size Contents<br />

0 2 <strong>Format</strong> index used in other records<br />

2 var. Number format string (Unicode string, 16-bit string length, ➜2.5.3)<br />

From BIFF5 on, the built-in number formats will be omitted. <strong>The</strong> built-in formats are dependent on the current regional<br />

settings of the operating system. <strong>The</strong> following table shows which number formats are used by default in a US-English<br />

environment. All indexes from 0 to 163 are reserved for built-in formats. <strong>The</strong> first user-defined format starts at 164.<br />

<strong>The</strong> built-in number formats, BIFF5-BIFF8: 313233<br />

Index Type <strong>Format</strong> string Index Type <strong>Format</strong> string<br />

0 General General 18 Time h:mm AM/PM<br />

1 Decimal 0 19 Time h:mm:ss AM/PM<br />

2 Decimal 0.00 20 Time h:mm<br />

3 Decimal #,##0 21 Time h:mm:ss<br />

4 Decimal #,##0.00 2232 Date/Time M/D/YY h:mm<br />

531 Currency "$"#,##0_);("$"#,##0) 37 Account. _(#,##0_);(#,##0)<br />

631 Currency "$"#,##0_);[Red]("$"#,##0) 38 Account. _(#,##0_);[Red](#,##0)<br />

731 Currency "$"#,##0.00_);("$"#,##0.00) 39 Account. _(#,##0.00_);(#,##0.00)<br />

831 Currency "$"#,##0.00_);[Red]("$"#,##0.00) 40 Account. _(#,##0.00_);[Red](#,##0.00)<br />

9 Percent 0% 4131 Currency _("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)<br />

10 Percent 0.00% 4231 33 Currency _(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)<br />

11 Scientific 0.00E+00 4331 Currency _("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)<br />

12 Fraction # ?/? 4431 33 Currency _(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)<br />

13 Fraction # ??/?? 45 Time mm:ss<br />

1432 Date M/D/YY 46 Time [h]:mm:ss<br />

15 Date D-MMM-YY 47 Time mm:ss.0<br />

16 Date D-MMM 48 Scientific ##0.0E+0<br />

17 Date MMM-YY 49 Text @<br />

31<br />

<strong>The</strong>se formats are always written by <strong>Excel</strong>, though they are built-in. <strong>The</strong>y contain the currency symbol of the current locale as plain<br />

text. It precedes or follows the value, according to the local settings. It is not required to write these formats.<br />

32<br />

<strong>The</strong>se formats are taken from the <strong>Microsoft</strong> Windows regional settings. Changes of these system settings will be reflected in the<br />

<strong>Excel</strong> document.<br />

33<br />

<strong>The</strong>se formats contain a blind currency symbol (an underscore precedes each character), if it follows the value. This happens for<br />

example in a German format with the Euro sign. Here the built-in format 42 looks like this: _-* #,##0 _€_-;-* #,##0 _€_-;_-* "-" _€_-;_-<br />

@_-<br />

174

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!