2.4.137 HeaderFooter

The HeaderFooter record specifies the even page header and footer text, and the first page header and footer text of the current sheet.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

frtHeader

...

...

guidSView (16 bytes, optional)

...

...

A

B

C

D

unused

cchHeaderEven

cchFooterEven

cchHeaderFirst

cchFooterFirst

strHeaderEven (variable)

...

strFooterEven (variable)

...

strHeaderFirst (variable)

...

strFooterFirst (variable)

...

frtHeader (12 bytes): An FrtHeader structure. The frtHeader.rt field MUST be 0x089C.

guidSView (16 bytes): A GUID as specified by [MS-DTYP] that specifies the current sheet view. If it is zero it means the current sheet. Otherwise, this field MUST match the guid field of the preceding UserSViewBegin record.

A - fHFDiffOddEven (1 bit):  A bit that specifies whether the odd and even pages use a different header and footer. If the value is 1, the Header and Footer records specify the odd page header and footer, and strHeaderEven and strFooterEven specify the even page header and footer.

B - fHFDiffFirst (1 bit):  A bit that specifies whether the first page uses a different header and footer from the rest of the pages. If the value is 1, the Header and Footer records specify the header and footer of the rest of the pages, and strHeaderFirst and strFooterFirst specify the first page header and footer.

C - fHFScaleWithDoc (1 bit):  A bit that specifies whether the header and footer is scaled with the sheet.

D - fHFAlignMargins (1 bit):  A bit that specifies whether the left and right edges of the header and footer are lined up with the left and right margins of the sheet.

unused (12 bits):  Undefined, and MUST be ignored.

cchHeaderEven (2 bytes):  An unsigned integer that specifies the number of characters in strHeaderEven. MUST be less than or equal to 255. The value MUST be zero if fHFDiffOddEven is zero.

cchFooterEven (2 bytes):  An unsigned integer that specifies the number of characters in strFooterEven. MUST be less than or equal to 255. The value MUST be zero if fHFDiffOddEven is zero.

cchHeaderFirst (2 bytes):  An unsigned integer that specifies the number of characters in strHeaderFirst. MUST be less than or equal to 255. The value MUST be zero if fHFDiffFirst is zero.

cchFooterFirst (2 bytes):  An unsigned integer that specifies the number of characters in strFooterFirst. MUST be less than or equal to 255. The value MUST be zero if fHFDiffFirst is zero.

strHeaderEven (variable):  An XLUnicodeString structure that specifies the header text on the even pages. The number of characters in the string MUST be equal to cchHeaderEven. The string can contain special commands, for example a placeholder for the page number, current date or text formatting attributes. Refer to Header for more details about the string format.

strFooterEven (variable):  An XLUnicodeString structure that specifies the footer text on the even pages. The number of characters in the string MUST be equal to cchFooterEven. The string can contain special commands, for example a placeholder for the page number, current date or text formatting attributes. Refer to Header for more details about the string format.

strHeaderFirst (variable):  An XLUnicodeString structure that specifies the header text on the first page. The number of characters in the string MUST be equal to cchHeaderFirst. The string can contain special commands, for example a placeholder for the page number, current date or text formatting attributes. Refer to Header for more details about the string format.

strFooterFirst (variable):  An XLUnicodeString structure that specifies the footer text on the first page. The number of characters in the string MUST be equal to cchFooterFirst. The string can contain special commands, for example a placeholder for the page number, current date or text formatting attributes. Refer to Header for more details about the string format.