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

テキストヘッダーフッターを追加する Excel で Power Automate

PDF4me テキストヘッダーフッターを追加する Excel は Power Automate ワークブックのヘッダーとフッターの6つのゾーン(ヘッダーとフッターの両方の左、中央、右)にカスタムテキストをスタンプするアクションです。これを使用して、レポートにタイトルを付けたり、フッターを機密情報としてマークしたり、ファイルを開かずに生成日をスタンプしたりできます。 Excel 手動で。

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

PDF4me テキストヘッダーフッターを追加する Excel 既存のワークブック上の 6 つの独立したゾーン (ヘッダー左、ヘッダー中央、ヘッダー右、フッター左、フッター中央、フッター右) のいずれかにテキストを書き込みます。ゾーンを空白のままにすると、そのゾーンはスキップされます。高度なパラメーターを使用すると、テキストの色など、ゾーンごとのスタイルを設定できます。これらのスタイルは、対応するゾーンにテキストが書き込まれた後にのみ適用されます。

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

認証方法 Power Automate 流れ?​

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

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

透かし領域は1つではなく、6つの独立した領域です。
ヘッダー左テキスト、ヘッダー中央テキスト、ヘッダー右テキスト、フッター左テキスト、フッター中央テキスト、フッター右テキストはそれぞれ任意です。必要な領域のみに入力してください。空欄はそのまま残ります。
高度なパラメータースタイル固有のゾーン
確認済みの例は「ヘッダー左 - 色」です。このパネルには、ゾーンごとの書式設定に関する合計15個の高度なパラメータが表示され、スタイル設定は、対応するテキストゾーンに値が設定された場合にのみレンダリングされます。
ファイルの内容とファイル名のみが必須です。
ヘッダー/フッターのテキストゾーンと高度なスタイルパラメータはすべてオプションです。6つのゾーンすべてを空白のままにした場合でもアクションは正常に実行され、ワークブックは変更されずに返されます。
Power Automate PDF4me Add Text Header Footer アクションは、ファイルコンテンツ、ファイル名 add_header_sample_file.xlsx、ヘッダー左テキスト Pdf4me Test、ヘッダー中央と右テキストは空、フッター左、中央、右テキストは空、詳細パラメーターでヘッダー左 - 色を黒に設定して構成されています。

ファイルの内容とファイル名をマッピングし、必要なヘッダー/フッターのテキストゾーンを入力したら、詳細パラメーターを展開してゾーンごとのスタイルを設定します。

パラメータ​

必須: ファイルの内容とファイル名は必ず入力してください。ヘッダー/フッターの6つのテキストゾーンはすべて任意入力です。必要なゾーンのみ入力してください。高度なスタイルパラメータは条件付きで、対応するテキストゾーンに値が入力されている場合にのみ有効になります。

パラメータ必須その機能例
File ContentOptionalContent 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 `TextHeaderFooter.xlsx`.report.xlsx
Header Left TextOptionalText content for the left section of the header.your value
Header Center TextOptionalText content for the center section of the header.your value
Header Right TextOptionalText content for the right section of the header.your value
Footer Left TextOptionalText content for the left section of the footer.your value
Footer Center TextOptionalText content for the center section of the footer.your value
Footer Right TextOptionalText content for the right section of the footer.your value
Header Left - ColorOptionalColor for the left header text (hex code or color name). Defaults to `Black`.Black
Header Left - Font SizeOptionalFont size for the left header text. Defaults to `11`.11
Header Center - ColorOptionalColor for the center header text (hex code or color name). Defaults to `Black`.Black
Header Center - Font SizeOptionalFont size for the center header text. Defaults to `11`.11
Header Right - ColorOptionalColor for the right header text (hex code or color name). Defaults to `Black`.Black
Header Right - Font SizeOptionalFont size for the right header text. Defaults to `11`.11
Footer Left - ColorOptionalColor for the left footer text (hex code or color name). Defaults to `Black`.Black
Footer Left - Font SizeOptionalFont size for the left footer text. Defaults to `11`.11
Footer Center - ColorOptionalColor for the center footer text (hex code or color name). Defaults to `Black`.Black
Footer Center - Font SizeOptionalFont size for the center footer text. Defaults to `11`.11
Footer Right - ColorOptionalColor for the right footer text (hex code or color name). Defaults to `Black`.Black
Footer Right - Font SizeOptionalFont size for the right footer text. Defaults to `11`.11
Target Worksheets - By NameOptionalComma-separated list of worksheet names to apply headers/footers to (leave empty for all) ( e.g. Sheet1,Sheet3 ).your value
Target Worksheets - By IndexOptionalComma-separated list of worksheet indexes (1-based) to apply headers/footers to (leave empty for all) ( 1,2,3).your value
Culture & Language SettingsOptionalCulture name for formatting (e.g., en-US, fr-FR, de-DE).your value

出力フィールド​

分野タイプ内容物
Output File ContentFile contentContent of the Excel file with the header and footer text added. 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.Map a valid Excel document into File Content.
Invalid file formatThe mapped file is not a valid Excel document.Confirm the source file is a genuine .xlsx or .xls workbook.
Invalid color formatA color parameter has an invalid hex code or color name.Use a valid hex format such as #FF0000 or a standard color name.

ヘッダーとフッターにテキストを追加するにはどうすればいいですか? Power Automate?​

  1. 追加 PDF4me → Excel - テキストヘッダー/フッターを追加 あなたの Power Automate 流れ。
  2. 地図 ファイルの内容 そして ファイル名 以前のアクションから(SharePoint、 OneDrive(またはファイルコンテンツを取得)。
  3. いずれか1つを記入してください ヘッダー左側のテキスト、 ヘッダー中央テキスト、 または ヘッダー右側のテキスト 必要なヘッダーゾーンについて。
  4. いずれか1つを記入してください フッター左側テキスト、 フッター中央テキスト、 または フッター右側のテキスト 必要なフッターゾーンについて。
  5. 拡大する 詳細パラメータ 塗りつぶされた領域にスタイルを適用するには、例えば ヘッダー左 - 色フローを実行すると、ブランド化されたワークブックが返されます。 書類。

典型的な構成​

ワークフローの例Common Power Automate flow patterns using Add Text Header Footer.
月次報告書タイトルのスタンプ
  1. 月次レポート生成日に、スケジュールされたトリガーが実行されます。
  2. ファイルコンテンツを取得すると、完成したレポートワークブックが取得されます。 SharePoint。
  3. 「テキストヘッダー/フッターを追加」では、ヘッダー中央のテキストをレポートタイトルに、フッター左のテキストを生成時のメモに設定します。
  4. ブランドロゴ入りのワークブックは、レポート文書ライブラリにアップロードされます。
機密性表示
  1. 敏感な Excel ファイルは制限付きフォルダにアップロードされました。
  2. ファイルコンテンツを取得すると、そのフォルダーからワークブックが取得されます。
  3. 「テキストヘッダー/フッターを追加」は、フッター中央テキストを機密保持に関する通知に設定します。
  4. マークされたワークブックは、同じ制限付きライブラリに保存されます。
クライアント向け成果物としてのブランディング
  1. プロジェクト管理コネクタで成果物が「最終」とマークされると、フローがトリガーされます。
  2. ファイルコンテンツを取得すると、最終的な Excel 成果物。
  3. 「テキストヘッダー/フッターを追加」では、ヘッダー左側のテキストを会社名に、フッター右側のテキストをformatDateTime式に設定します。
  4. ブランドロゴ入りのファイルは、クライアントの担当者にメールで送信されます。

実践的なヒント​

Leave a zone blank to skip it
You do not need to fill all six text zones. An empty Header Right Text or Footer Left Text simply leaves that section unchanged.
Styling only applies to filled zones
Setting Header Left - Color has no visible effect unless Header Left Text also has a value. Fill the text first, then style it.
File Name needs the extension
Always include .xlsx or .xls in File Name. Omitting the extension can prevent the output from opening correctly in Excel.
Use expressions for auto-updating footers
Map Power Automate's formatDateTime() expression into a footer Text field for a footer that always shows the current date without manual edits.
Branch on Success before continuing
Add a Condition on Success after this action so a failed run does not pass an unbranded or unchanged workbook further down the flow.

チートシート​

分野価値
ActionExcel - Add Text Header Footer
Required fieldsFile Content, File Name
Header zonesHeader Left Text, Header Center Text, Header Right Text (each optional)
Footer zonesFooter Left Text, Footer Center Text, Footer Right Text (each optional)
Advanced parameters15 total, confirmed example Header Left - Color (conditional on matching text zone)
OutputProcessed File Content + Success + Error Message + Error Details

よくある質問​

How do I add a header and footer to Excel files in Power Automate?+
Add the PDF4me Add Text Header Footer action, map the workbook into File Content, set a File Name, then fill in any of the six Header Left, Header Center, Header Right, Footer Left, Footer Center, or Footer Right Text fields you need. Leave the rest blank.
Can I add page numbers to an Excel header with this action?+
The header and footer text fields accept literal text only, not Excel's built-in page-number field codes. To show a running page count, generate the number upstream in your flow and map it into one of the Text fields as a plain string. See Microsoft's guide to <a href="https://support.microsoft.com/en-us/office/headers-and-footers-in-a-worksheet" target="_blank" rel="noopener noreferrer">headers and footers in a worksheet</a> for how native Excel page-number codes work if you are building the sheet manually.
How do I set the header text color?+
Expand Advanced parameters in the action panel. The connector exposes 15 advanced style parameters, one confirmed example is Header Left - Color, which only takes effect once Header Left Text has a value.
Does this action support both .xls and .xlsx files?+
Yes. Map either format into File Content and keep the File Name extension consistent with the source workbook. 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 the underlying Excel formatting behaves across file formats.
What happens if I leave every header and footer field blank?+
The action still runs and returns Success true, but the workbook is unchanged since there is no text to place in any zone.

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

  • 財務諸表: 会社名と報告期間のヘッダーを追加する
  • 予算報告書予算文書に機密保持に関する注記を挿入する
  • 監査文書: 監査日とバージョン情報をヘッダーに適用する
  • 経費報告書: フッターに提出日と承認状況を追加する

関連アクション​

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

ヘルプが必要な場合​