# openpyxl.worksheet.header_footer module

class openpyxl.worksheet.header_footer.HeaderFooter(differentOddEven=None, differentFirst=None, scaleWithDoc=None, alignWithMargins=None, oddHeader=None, oddFooter=None, evenHeader=None, evenFooter=None, firstHeader=None, firstFooter=None)

  Bases: `Serialisable`

  alignWithMargins

    Values must be of type <class ‘bool’>

  differentFirst

    Values must be of type <class ‘bool’>

  differentOddEven

    Values must be of type <class ‘bool’>

  evenFooter

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooterItem’>

  evenHeader

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooterItem’>

  firstFooter

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooterItem’>

  firstHeader

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooterItem’>

  oddFooter

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooterItem’>

  oddHeader

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooterItem’>

  scaleWithDoc

    Values must be of type <class ‘bool’>

  tagname = 'headerFooter'

class openpyxl.worksheet.header_footer.HeaderFooterItem(left=None, right=None, center=None)

  Bases: `Strict`

  Header or footer item

  center

    Values must be of type <class ‘openpyxl.worksheet.header_footer._HeaderFooterPart’>

  centre

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptive name is desired (eg. “underline” for “u”)

  classmethod from_tree(node)
  left

    Values must be of type <class ‘openpyxl.worksheet.header_footer._HeaderFooterPart’>

  right

    Values must be of type <class ‘openpyxl.worksheet.header_footer._HeaderFooterPart’>

  to_tree(tagname)

    Return as XML node