Lewati ke konten utama

Tambahkan Gambar Header Footer ke Excel di dalam Power Automate

PDF4me Tambahkan Gambar Header Footer ke Excel adalah sebuah Power Automate tindakan yang menyisipkan logo, tanda air, atau gambar merek ke dalam Excel Bagian header atau footer lembar kerja. Gunakan untuk membubuhkan logo perusahaan pada laporan mingguan, menandai file rahasia dengan gambar keamanan, atau melakukan co-branding pada hasil kerja klien, tanpa perlu membukanya. Excel secara manual.

Apa yang dilakukan oleh tindakan ini?

PDF4me Tambahkan Gambar Header Footer ke Excel Fungsi ini memetakan file gambar ke header atau footer buku kerja, dengan perataan kiri, tengah, atau kanan, pada lembar kerja tertentu atau seluruh file. Margin halaman di sekitar gambar dapat dikonfigurasi dalam sentimeter melalui parameter Lanjutan.

Postingan Blog Terkait
Belum ada postingan blog untuk fitur ini — akan segera hadir.
Sementara itu, jelajahi blog PDF4me untuk menemukan tutorial dan alur kerja di berbagai platform.
Kunjungi blog ini

Bagaimana Cara Saya Mengautentikasi Saya? Power Automate Mengalir?

Setiap PDF4me tindakan dalam Power Automate Membutuhkan koneksi yang valid. Buat atau pilih koneksi yang sesuai dengan kebutuhan Anda. PDF4me API kunci agar alur dapat melakukan autentikasi Excel permintaan pemformatan gambar secara aman.

Fakta Penting yang Tidak Boleh Anda Lewatkan

IsHeader adalah menu tarik-turun Ya/Tidak, bukan teks bebas.
Panel konektor menampilkan IsHeader sebagai menu tarik-turun Ya/Tidak (default Ya), dan Posisi Gambar sebagai menu tarik-turun Kiri/Tengah/Kanan (default Tengah). Keduanya merupakan pilihan tarik-turun dalam tampilan langsung. UI, bukan kolom boolean atau teks bebas.
7 parameter lanjutan untuk margin dan penargetan
Panel Parameter Lanjutan menunjukkan "Menampilkan 5 dari 7": Margin Atas, Margin Bawah, Margin Kiri, dan Margin Kanan (masing-masing dalam sentimeter) dikonfirmasi terlihat, bersama dengan Nama Lembar Kerja, Indeks Lembar Kerja, dan bidang penargetan Nama Budaya yang umum untuk konektor ini. Excel tindakan.
Pemilih lembar kerja kosong berarti setiap lembar
Jika Nama Lembar Kerja dan Indeks Lembar Kerja dibiarkan kosong, gambar akan diterapkan ke setiap lembar kerja dalam buku kerja sekaligus.
Tindakan Power Automate PDF4me Tambah Header dan Footer Gambar dikonfigurasi dengan Konten File yang dipetakan, Nama File add_header_sample_file.xlsx, Konten Gambar yang dipetakan, Posisi Gambar Tengah, IsHeader Ya, dan parameter Lanjutan menunjukkan 5 dari 7 dengan Margin Atas 5, Margin Bawah 5, Margin Kiri 1,9, Margin Kanan 1,9.

Petakan Konten File, Nama File, dan Konten Gambar, lalu pilih Posisi Gambar dan penempatan IsHeader.

Parameter

Diperlukan: Konten Berkas, Nama Berkas, dan Konten Gambar. Posisi Gambar dan IsHeader memiliki nilai default yang berfungsi. Margin dan penargetan lembar kerja adalah parameter lanjutan yang bersifat kondisional.

ParameterDiperlukanApa fungsinya?Contoh
File ContentRequiredBase64 content of the source Excel workbook, mapped from SharePoint, OneDrive, or another prior action.[File Content from Get file content]
File NameRequiredExcel filename including extension (.xlsx or .xls), used for processing and output identification.add_header_sample_file.xlsx
Image ContentRequiredBase64 content of the logo or branding image, mapped from SharePoint, OneDrive, or an email attachment. PNG, JPG, JPEG, or GIF.[File Content from Get file content]
Image PositionOptionalHorizontal alignment within the header/footer zone: Left, Center, or Right. Defaults to Center.Center
IsHeaderOptionalYes places the image in the header, No places it in the footer. Defaults to Yes.Yes
Top MarginConditionalAdvanced parameter. Top page margin in centimeters, controls spacing from the top edge and affects header placement.5
Bottom MarginConditionalAdvanced parameter. Bottom page margin in centimeters, controls spacing from the bottom edge and affects footer placement.5
Left MarginConditionalAdvanced parameter. Left page margin in centimeters, controls overall page layout spacing.1.9
Right MarginConditionalAdvanced parameter. Right page margin in centimeters, controls overall page layout spacing.1.9
Worksheet NamesConditionalAdvanced parameter. List of worksheet names to target. Leave empty along with Worksheet Indexes to apply to every sheet.["Sheet1", "Report"]
Worksheet IndexesConditionalAdvanced parameter. List of 1-based worksheet indexes to target. Combines with Worksheet Names if both are set.[1, 2]
Culture NameConditionalAdvanced parameter. Culture/locale code for processing, for example en-US or de-DE. Blank uses the invariant culture.en-US

Catatan: Jika Nama Lembar Kerja dan Indeks Lembar Kerja keduanya kosong atau null, gambar akan diterapkan ke setiap lembar kerja dalam buku kerja.

Bidang Keluaran

BidangJenisIsi di dalamnya
documentBase64The Excel workbook with the image header/footer applied.
SuccessBooleantrue if the action completed, false if it failed.
ErrorMessageStringError description, null when Success is true.
ErrorsArrayDetailed error objects, empty when Success is true.

Apa Arti Pesan Kesalahan Umum Tersebut?

Pesan KesalahanMenyebabkanLarutan
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.
  1. Menambahkan PDF4meExcel - Tambahkan Gambar Header Footer untuk Anda Power Automate mengalir.
  2. Peta Isi File Dan Nama File dari tindakan sebelumnya (SharePoint, OneDrive, atau Dapatkan isi file).
  3. Peta Konten Gambar dari file logo, watermark, atau gambar merek.
  4. Mengatur Apakah Header ke Ya untuk header atau TIDAK untuk footer, dan pilih Posisi Gambar: Kiri, Tengah, atau Benar.
  5. Memperluas Parameter lanjutan untuk mengatur Atas, Dasar, Kiri, Dan Margin Kananatau target spesifik Nama Lembar Kerja/Indeks Lembar KerjaJalankan alur kerja, buku kerja bermerek akan muncul sebagai berikut: dokumen.

Pengaturan Umum

Contoh Alur KerjaCommon Power Automate flow patterns using Add Image Header Footer.
Logo merek laporan mingguan
  1. Alur terjadwal dipicu setiap Senin pagi.
  2. Mendapatkan isi file mengambil laporan kinerja mingguan dari SharePoint.
  3. Add Image Header Footer menyisipkan logo perusahaan, IsHeader Yes, Image Position Center, Worksheet Names dan Worksheet Indexes dibiarkan kosong untuk mencakup setiap lembar kerja.
  4. Laporan bermerek tersebut dikirim melalui email ke manajemen dan diarsipkan.
Tanda air rahasia di bagian bawah
  1. Suatu alur dipicu ketika suatu zat sensitif Excel berkas tersebut masuk ke area terbatas. SharePoint folder.
  2. Fungsi "Get file content" mengambil isi buku kerja, dan gambar stempel "Rahasia" diambil dari aset.
  3. Tambahkan Header dan Footer Gambar dengan mengatur IsHeader No, Posisi Gambar Tengah, dan hanya menargetkan Nama Lembar Kerja ["Sheet1", "Summary"].
  4. Berkas yang telah diberi stempel dikirim melalui email hanya kepada peninjau yang berwenang.
Hasil akhir yang bermerek bersama klien
  1. Suatu alur akan dipicu ketika hasil proyek ditandai sebagai Final.
  2. Tambahkan Gambar Header Footer menyisipkan logo internal perusahaan, Posisi Gambar Kanan, IsHeader Ya.
  3. Panggilan kedua Add Image Header Footer menyisipkan logo klien, Image Position Left, pada lembar kerja yang sama.
  4. Buku kerja dengan dua merek tersebut dikirimkan kepada pemangku kepentingan klien.

Tips Praktis

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.

Lembar Panduan Singkat

BidangNilai
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
Outputdocument (Base64 workbook) + Success + ErrorMessage + Errors

Pertanyaan Umum

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.

Studi Kasus & Aplikasi Industri

  • Laporan KeuanganTambahkan header logo perusahaan ke laporan triwulanan.
  • Dokumen Audit: Terapkan tanda air logo firma audit di bagian footer
  • Laporan PengeluaranTambahkan header logo perusahaan untuk pengajuan pengeluaran.

Tindakan Terkait

Tugas yang Sama di Platform Lain

Dapatkan Bantuan