メインコンテンツへスキップ

ヘッダーとフッターを削除 Excel で Power Automate

PDF4me ヘッダーとフッターを削除 Excel は Power Automate ワークブックのリブランディングやアーカイブを行う前に、選択したヘッダーとフッター部分を削除するアクションです。特定のシートまたはファイル全体から、古いロゴ、クォーターラベル、機密マークなどを左、中央、右の領域から削除する場合に使用できます。

このアクションが何をするか

PDF4me ヘッダーとフッターを削除 Excel 既存のワークブック上の、ヘッダー左、ヘッダー中央、ヘッダー右、フッター左、フッター中央、フッター右の6つの独立した領域をクリアします。ワークシート名またはインデックスを指定して特定のワークシートを対象とするか、両方を空欄にしてすべてのシートを一度にクリアすることもできます。

関連ブログ記事
この機能に関するブログ記事はまだありません。近日公開予定です。
その間、PDF4me ブログを閲覧して、あらゆるプラットフォームのチュートリアルやワークフローをご覧ください。
ブログをご覧ください →

認証方法 Power Automate 流れ?​

毎 PDF4me アクション Power Automate 有効な接続が必要です。 PDF4me API フローが認証できるようにするためのキー Excel ヘッダー/フッターのリクエストを安全に処理します。

見逃してはならない重要な事実​

6つの独立したイエス/ノーゾーン
ヘッダーの左、中央、右を削除するオプションと、フッターの左、中央、右を削除するオプションは、それぞれ個別の「はい/いいえ」ドロップダウンメニューで、デフォルトは「いいえ」です。削除したいゾーンのみを選択してください。
ワークシートターゲティングのための3つの高度なパラメータ
詳細パラメーターパネルには、「3件中1件目を表示」として、「ワークシート名」、「ワークシートインデックス」、「カルチャー名」が表示されます。ワークブック内のすべてのシートを処理するには、「ワークシート名」と「ワークシートインデックス」を空欄のままにしてください。
ファイルの内容のみが本当に必要です
コネクタパネルでは、ファイルコンテンツに必須項目としてアスタリスクが表示されます。ファイル名とすべての削除フラグはオプションです。すべてのフラグを「いいえ」に設定して実行すると、正常に完了しますが、ワークブックは変更されません。
Power Automate PDF4me の「ヘッダー/フッターの削除」アクションは、ファイルコンテンツがマッピングされ、ファイル名が add_header_sample_file.xlsx、ヘッダー左の削除が「はい」に設定され、ヘッダー中央の削除、ヘッダー右の削除、フッター左の削除、フッター中央の削除、フッター右の削除がすべて「いいえ」に設定され、詳細パラメーターが 3 件中 1 件表示され、カルチャ名が表示されています。

マップファイルコンテンツを設定し、ファイル名を設定した後、削除したいヘッダー/フッターゾーンのみを「はい」に切り替えます。

パラメータ​

必須: ファイルコンテンツのみを指定する必要があります。ファイル名と6つの削除フラグはすべてオプションです。ワークシート名、ワークシートインデックス、およびカルチャ名は、デフォルト設定を超えるターゲティングやローカライズが必要な場合にのみ適用される条件付き詳細パラメーターです。

パラメータ必須その機能例
File ContentRequiredContent of the Excel file to process. Map it from the file content returned by a previous action, such as SharePoint or OneDrive Get file content.@{body('Get_file_content')?['$content']}
File NameOptionalName of the Excel file, including its extension (for example `report.xlsx`). Map it from the file name returned by a previous action. Defaults to `RemoveHeaderFooter.xlsx`.report.xlsx
Remove Header LeftOptionalRemove left section of header. Defaults to `No`.No
Remove Header CenterOptionalRemove center section of header. Defaults to `No`.No
Remove Header RightOptionalRemove right section of header. Defaults to `No`.No
Remove Footer LeftOptionalRemove left section of footer. Defaults to `No`.No
Remove Footer CenterOptionalRemove center section of footer. Defaults to `No`.No
Remove Footer RightOptionalRemove right section of footer. Defaults to `No`.No
Worksheet NamesOptionalNames of worksheets to remove headers/footers from.your value
Worksheet IndexesOptionalIndexes of worksheets to remove headers/footers from.your value
Culture NameOptionalCulture name for processing.your value

出力フィールド​

分野タイプ内容物
Processed File ContentFile contentContent of the Excel file with the selected header and footer sections removed. Map it into the next action, for example the File Content field of SharePoint or OneDrive Create file.
SuccessYes/NoWhether the operation completed successfully
Error MessageTextError message if operation failed
Error DetailsArrayList of detailed error messages

よくあるエラーメッセージの意味とは?​

エラーメッセージ原因解決
Request is emptyThe request object is null.Provide a valid request object.
Document is emptyFile Content is null or empty.Provide a valid Excel document in File Content.
Invalid worksheet selectionWorksheet names don't exist or indexes are out of range.Use existing worksheet names or valid 0-based indexes.
Available worksheets in workbook (X total)Informational message shown when worksheet selection fails.Review worksheet names/indexes and use a valid value from the X available worksheets.

ヘッダーとフッターを削除するにはどうすればいいですか? Power Automate?​

  1. 追加 PDF4me → Excel - ヘッダーとフッターの削除 あなたの Power Automate 流れ。
  2. 地図 ファイルの内容 以前のアクションから(SharePoint、 OneDrive、またはファイルコンテンツを取得して設定します ファイル名。
  3. セット ヘッダー左側を削除、 ヘッダー中央を削除、 または ヘッダー右側を削除 に はい クリアしたいヘッダーゾーンごとに設定してください。
  4. セット フッターを左に削除、 フッター中央を削除、 または フッター右側を削除 に はい クリアしたいフッターゾーンごとに設定してください。
  5. 拡大する 詳細パラメータ 特定の対象をターゲットにする ワークシート名 または ワークシート索引または、両方を空のままにしてすべてのシートを処理します。フローを実行すると、クリーンアップされたワークブックが次のように返されます。 書類。

典型的な構成​

ワークフローの例Common Power Automate flow patterns using Remove Header Footer.
リブランディングの準備
  1. リブランディングイニシアチブの流れは、 SharePoint テンプレートライブラリ。
  2. ファイルコンテンツを取得すると、各 Excel テンプレート。
  3. 「ヘッダー/フッターを削除」では、6 つの削除フラグすべてが「はい」に設定され、「ワークシート名」と「ワークシートインデックス」は空欄のままになり、すべてのシートがクリアされます。
  4. 「テキストヘッダーとフッターの追加」機能は、クリーンアップされたワークブックに新しいブランドロゴを刻印します。
四半期ごとのテンプレートの整理
  1. 定期的な処理は各四半期の開始時に実行されます。
  2. ファイルコンテンツを取得すると、四半期報告書のテンプレートが取得されます。
  3. ヘッダー フッターを削除すると、ヘッダー中央の削除とフッター左の削除が「はい」に設定され、ページ番号を保持するためにヘッダー右の削除は「いいえ」のままになり、ワークシート名 ["Summary", "Financial Data"] が対象となります。
  4. 後続の処理により、新しい四半期ラベルがクリア済みヘッダーに挿入されます。
クライアントへの納品物のサニタイズ
  1. 内部レポートが顧客への配信対象としてマークされた時点で、フローがトリガーされます。
  2. ファイルコンテンツを取得すると内部 Excel 報告。
  3. ヘッダーフッターを削除すると、すべてのフッターフラグとヘッダー左の削除、ヘッダー中央の削除が「はい」に設定され、ページネーションを維持するためにヘッダー右の削除は「いいえ」のままになり、メインセクションにはワークシートインデックス [0、1、2] が使用されます。
  4. 内容が修正されたワークブックは、クライアントの担当者にメールで送信されます。

実践的なヒント​

Each zone is independent
You do not need to clear all six zones. Set only the specific Header/Footer Left, Center, or Right flags to Yes for the sections you actually want removed.
Empty worksheet selectors mean all sheets
If both Worksheet Names and Worksheet Indexes are left empty, the action processes every worksheet in the workbook, not just the first one.
Worksheet Names and Indexes combine, not replace
If you set values in both Worksheet Names and Worksheet Indexes, the action processes the union of both lists, so a name typo will not silently exclude a sheet if its index is also listed.
This does not touch worksheet data
Only the header and footer margins are affected. Cell values, formulas, and body formatting are left exactly as they were.
Branch on Success before continuing
Add a Condition on Success after this action so a failed run does not pass a partially cleaned workbook further down the flow.

チートシート​

分野価値
ActionExcel - Remove Header Footer
Required fieldsFile Content
Header removal flagsRemove Header Left, Center, Right (each Yes/No, default No)
Footer removal flagsRemove Footer Left, Center, Right (each Yes/No, default No)
Advanced parameters3 total: Worksheet Names, Worksheet Indexes, Culture Name
OutputProcessed File Content + Success + Error Message + Error Details

よくある質問​

How do I remove headers and footers from an Excel file in Power Automate?+
Add the PDF4me Remove Header Footer action, map the workbook into File Content, then set Remove Header Left, Center, Right and Remove Footer Left, Center, Right to Yes for each section you want stripped. Sections left at No are preserved.
Can I remove headers from only some worksheets, not the whole workbook?+
Yes. Expand Advanced parameters and list Worksheet Names or Worksheet Indexes for the sheets to target. Leaving both empty processes every worksheet in the workbook. See Microsoft's guide to <a href="https://support.microsoft.com/en-us/office/headers-and-footers-in-a-worksheet-a4a1e099-8ee5-4f30-be8f-c8ba201e7005" target="_blank" rel="noopener noreferrer">headers and footers in a worksheet</a> for how Excel organizes header/footer scope per sheet.
Can I remove just the center header and keep the left and right sections?+
Yes. Each of the six sections, Header Left, Header Center, Header Right, Footer Left, Footer Center, Footer Right, is an independent Yes/No dropdown, so you can strip one section while leaving the other five untouched.
What is Culture Name used for in this action?+
Culture Name is an optional advanced parameter that sets the locale used during processing, for example en-US or de-DE. Leave it blank to use the invariant culture. See <a href="https://www.ablebits.com/office-addins-blog/excel-header-footer-add-change-remove/" target="_blank" rel="noopener noreferrer">Ablebits' guide to Excel headers and footers</a> for how locale affects header/footer formatting codes.
Does removing headers and footers change the worksheet data?+
No. The action only clears the selected header and footer sections. Cell data, formulas, and formatting in the worksheet body are left untouched.

業界におけるユースケースとアプリケーション​

  • 企業ブランド再構築すべてのExcelテンプレートから古い会社のロゴと名前を削除します。
  • 合併統合統合エンティティのブランディングを適用する前に、ヘッダー/フッターを整理してください。
  • 事業部再編部門テンプレートから古い部門ヘッダーを削除する
  • 製品ラインの変更: 販売およびマーケティングテンプレートからクリーンな製品ブランディング

関連アクション​

他のプラットフォームでの同じタスク​

ヘルプが必要な場合​