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

画像ヘッダーフッターを追加する Excel で Power Automate

PDF4me 画像ヘッダーフッターを追加する Excel は Power Automate ロゴ、透かし、またはブランドイメージを挿入するアクション Excel ワークシートのヘッダーまたはフッターセクション。週次レポートに会社のロゴをスタンプしたり、機密ファイルにセキュリティ画像を付けたり、クライアントの成果物に共同ブランドを付けたりするのに使用できます。 Excel 手動で。

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

PDF4me 画像ヘッダーフッターを追加する Excel 画像ファイルをワークブックのヘッダーまたはフッターにマッピングし、特定のワークシートまたはファイル全体に対して、左揃え、中央揃え、右揃えのいずれかで配置します。画像の周囲のページ余白は、詳細設定でセンチメートル単位で設定できます。

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

認証方法 Power Automate 流れ?​

毎 PDF4me アクション Power Automate 有効な接続が必要です。 PDF4me API フローが認証できるようにするためのキー Excel 画像フォーマット要求を安全に処理します。

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

IsHeaderははい/いいえのドロップダウンリストであり、自由入力ではありません。
コネクタパネルでは、IsHeader を Yes/No ドロップダウン (デフォルトは Yes) として、Image Position を Left/Center/Right ドロップダウン (デフォルトは Center) として表示します。どちらもライブ画面でドロップダウン選択できます。 UIブール値フィールドや自由記述フィールドではありません。
マージンとターゲティングに関する7つの高度なパラメータ
詳細パラメーターパネルには「7件中5件を表示」と表示され、上余白、下余白、左余白、右余白(それぞれセンチメートル単位)が、このコネクタに共通するワークシート名、ワークシートインデックス、カルチャー名の対象フィールドとともに表示されていることが確認できます。 Excel 行動。
空のワークシートセレクタは、すべてのシートを意味します。
ワークシート名とワークシートインデックスの両方が空欄の場合、画像はブック内のすべてのワークシートに一度に適用されます。
Power Automate PDF4me の「画像ヘッダーフッターの追加」アクションは、ファイルコンテンツがマッピングされ、ファイル名が add_header_sample_file.xlsx、画像コンテンツがマッピングされ、画像の位置が中央、IsHeader が「はい」に設定され、詳細パラメーターが 7 件中 5 件表示され、上余白 5、下余白 5、左余白 1.9、右余白 1.9 となっています。

ファイルの内容、ファイル名、画像の内容を配置し、次に画像の位置とIsHeaderの配置を選択します。

パラメータ​

必須: ファイルの内容、ファイル名、画像の内容。画像の位置とIsHeaderには、動作するデフォルト値があります。余白とワークシートのターゲット設定は、条件付きの詳細パラメーターです。

パラメータ必須その機能例
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 `ImageHeaderFooter.xlsx`.report.xlsx
Image ContentOptionalContent of the image to add. Map it from the file content returned by a previous action, such as SharePoint or OneDrive Get file content.@{body('Get_file_content')?['$content']}
Image PositionOptionalPosition of the image in the header footer. Options: Left, Center, Right. Defaults to `Center`.Center
IsHeaderOptionalIf Yes, the image is added to the header; if No, to the footer. Defaults to `Yes`.Yes
Target Worksheets - By NameOptionalNames of the worksheets to add the image to. Leave empty to apply it to all worksheets.your value
Target Worksheets - By IndexOptionalPositions of the worksheets to add the image to, counting from 1. Leave empty to apply it to all worksheets.your value
Top Margin (cm)OptionalTop margin value in centimeters. Defaults to `1.9`.1.9
Bottom Margin (cm)OptionalBottom margin value in centimeters. Defaults to `1.9`.1.9
Left Margin (cm)OptionalLeft margin value in centimeters. Defaults to `1.9`.1.9
Right Margin (cm)OptionalRight margin value in centimeters. Defaults to `1.9`.1.9
Culture & Language SettingsOptionalCulture name for formatting (e.g., en-US, fr-FR, de-DE). Defaults to `en-US`.en-US

注記: ワークシート名とワークシートインデックスの両方が空またはnullの場合、画像はブック内のすべてのワークシートに適用されます。

出力フィールド​

分野タイプ内容物
Output File ContentFile contentContent of the Excel file with the header or footer image 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.Provide a valid Excel document in File Content.
Image content is emptyImage Content is null or empty.Provide valid image content from a prior action.
Invalid worksheet selectionWorksheet names or indexes don't exist or are out of range.Use existing worksheet names or valid 1-based indexes.
Available worksheets in workbook (X total)Informational message shown when worksheet selection validation 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. セット IsHeader に はい ヘッダーまたは いいえ フッターの場合は、 画像の位置: 左、 中心、 または 右。
  5. 拡大する 詳細パラメータ 設定する トップ、 底、 左、 そして 右余白または特定のターゲット ワークシート名/ワークシート索引フローを実行すると、ブランド化されたワークブックが返されます。 書類。

典型的な構成​

ワークフローの例Common Power Automate flow patterns using Add Image Header Footer.
週報ロゴのブランディング
  1. スケジュールされた処理は毎週月曜日の朝に実行されます。
  2. ファイルコンテンツを取得すると、週次パフォーマンスレポートが取得されます。 SharePoint。
  3. 画像ヘッダーフッターを追加すると、会社のロゴが挿入されます。IsHeaderは「はい」、画像の位置は中央、ワークシート名とワークシートインデックスはすべてのシートをカバーするために空欄のままになっています。
  4. ブランドロゴ入りのレポートは経営陣にメールで送信され、アーカイブに保存されます。
機密情報を示す透かしフッター
  1. 感度が高い場合にフローがトリガーされます Excel ファイルは制限された場所に移動します SharePoint フォルダ。
  2. ファイルコンテンツを取得するとワークブックが取得され、アセットから「機密」スタンプ画像が取得されます。
  3. 画像ヘッダーフッターを追加すると、IsHeader No、画像の位置を中央に設定し、ワークシート名 ["Sheet1", "Summary"] のみを対象とします。
  4. スタンプが押されたファイルは、承認された審査担当者のみにメールで送信されます。
クライアントとの共同ブランド成果物
  1. プロジェクトの成果物が「最終」とマークされたときに、フローがトリガーされます。
  2. 画像ヘッダーフッターを追加すると、社内ロゴが挿入されます。画像の位置は右、ヘッダーかどうかは「はい」です。
  3. 2回目の「画像ヘッダー/フッターの追加」呼び出しにより、クライアントのロゴが左揃えで同じワークシートに挿入されます。
  4. 両社のブランド名が入ったワークブックは、クライアントの担当者に送付されます。

実践的なヒント​

IsHeader and footer share the same margin controls
Top and Bottom Margin affect header and footer placement respectively regardless of the IsHeader setting, so adjust both if you plan to add separate header and footer images in sequence.
Chain two calls for both header and footer
One action call places the image in either the header or the footer, not both. Chain two Add Image Header Footer actions, one with IsHeader Yes and one with IsHeader No, to brand both zones in a single flow.
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.
Test margin values on a copy first
Margins that are too small can cause the image to overlap the first row of data. Test with representative worksheet content before deploying to a production report.
Branch on Success before continuing
Add a Condition on Success after this action so a failed image insertion does not pass a partially branded workbook further down the flow.

チートシート​

分野価値
ActionExcel - Add Image Header Footer
Required fieldsFile Content, File Name, Image Content
Placement fieldsImage Position (Left/Center/Right, default Center), IsHeader (Yes/No, default Yes)
Advanced parameters7 total: Top/Bottom/Left/Right Margin (cm), Worksheet Names, Worksheet Indexes, Culture Name
OutputProcessed File Content + Success + Error Message + Error Details

よくある質問​

How do I add a logo image to an Excel header in Power Automate?+
Add the PDF4me Add Image Header Footer action, map the workbook into File Content and the logo file into Image Content, set IsHeader to Yes, and choose an Image Position of Left, Center, or Right. Leave Worksheet Names and Worksheet Indexes empty to apply the logo to every sheet.
Can I place the image in the footer instead of the header?+
Yes. Set IsHeader to No to place the image in the footer section instead. The same Image Position and margin controls apply to both header and footer placement.
Can I add the image to only specific worksheets?+
Yes. Expand Advanced parameters and list Worksheet Names or Worksheet Indexes for the sheets to target. Leaving both empty applies the image to every worksheet in the workbook. See Microsoft's guide to <a href="https://support.microsoft.com/en-us/office/add-a-watermark-in-excel-a372182a-d733-484e-825c-18ddf3edf009" target="_blank" rel="noopener noreferrer">adding images to Excel worksheets</a> for how Excel scopes header/footer content per sheet.
What image formats does this action accept?+
The action accepts PNG, JPG, JPEG, and GIF image content mapped from a prior Get file content step, SharePoint, OneDrive, or an email attachment.
What do the margin parameters control?+
Top, Bottom, Left, and Right Margin, each in centimeters, are advanced parameters that control the page margins around the header/footer area, which affects how much space the inserted image has before it overlaps worksheet content. 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 page margins interact with header/footer sizing.

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

  • 財務諸表四半期報告書に会社ロゴのヘッダーを追加する
  • 監査文書監査法人のロゴ透かしをフッターに適用する
  • 経費報告書経費精算申請書に企業ロゴのヘッダーを追加する

関連アクション​

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

ヘルプが必要な場合​