異なるページ用に異なるヘッダーとフッターの設定

MS Excelで異なるヘッダーとフッターを設定するにはどうすればよいですか

異なるヘッダーとフッターの設定

  1. ページレイアウト > 印刷タイトル > ヘッダー/フッターをクリックします。
  2. 奇数と偶数のページを異なるものとする または 最初のページを異なるものとする をチェックします。
  3. 異なるヘッダーとフッターを入力します。

Aspose.Cells for Python Excelライブラリを使用して、異なるヘッダーとフッターを設定する方法

Aspose.Cells for Python via .NETは、Excelと同じ動作をします。

  1. PageSetup.is_hf_diff_odd_evenPageSetup.is_hf_diff_first のフラグを設定します
  2. 異なるヘッダーとフッターを入力します。
from aspose.cells import Workbook
# Creates a new file.
wb = Workbook()
# Gets the setting of page setup.
pageSetup = wb.worksheets[0].page_setup
# Sets different odd and even pages
pageSetup.is_hf_diff_odd_even = True
pageSetup.set_header(1, "I am the header of the Odd page.")
pageSetup.set_even_header(1, "I am the header of the Even page.")
# Sets different first page
pageSetup.is_hf_diff_first = True
pageSetup.set_first_page_header(1, "I am the header of the First page.")