Lewati ke konten utama

Memisahkan Buku Kerja Excel Multi-Sheet menjadi File Terpisah di Power Automate (4 Tindakan, Jumlah Sheet Berapa Pun)

· Satu menit membaca
SEO and Content Writer

Buku kerja dengan 5, 50, atau 500 lembar dapat dibagi menjadi bagian-bagian individual. .xlsx berkas dalam satu alur Power Automate. PDF4me Excel - Lembar Kerja Terpisah mengembalikan array dengan satu file per lembar; sebuah Terapkan pada setiap Loop ini mengipasi data untuk penulisan ke Dropbox, SharePoint, OneDrive, atau Dataverse. Panduan ini akan menjelaskan langkah-langkah persis yang ditunjukkan pada tangkapan layar: 5 tab. Separate.xlsx di Dropbox menjadi Sheet1.xlsx melalui Sheet5.xlsx di dalam folder keluaran. Alur total: 4 aksi, tanpa kode, berjalan dalam waktu sekitar 9 detik dari awal hingga akhir..

Alur secara sekilas
1. Manual trigger
Manually trigger a flow. Swap for any trigger that produces a workbook.
2. Get file content (path)
Dropbox path: /pdf4metest/excel/separate worksheets/Separate.xlsx
3. Excel - Separate Worksheets
PDF4me action. Splits the 5-sheet workbook into 5 single-sheet XLSXes.
4. Apply to each → Create file
Loop outputDocuments. Each iteration writes one sheet as its own .xlsx to Dropbox.
Versi singkatnya

Pemicu manual memulai alur kerja. Dropbox Dapatkan isi file menggunakan jalur. membaca Separate.xlsx (5 lembar, masing-masing dengan daftar catatan Orang yang berbeda). Excel - Lembar Kerja Terpisah mengembalikan sebuah dokumen keluaran array dengan 5 entri: {fileName: "Sheet1.xlsx", streamFile: "<base64>"} melalui Sheet5.xlsx. Sebuah Terapkan pada setiap Perintah `over outputDocuments` dijalankan sekali per lembar (tangkapan layar menunjukkan hal tersebut). 1 dari 5 penghitung iterasi) dan menggunakan Buat berkas untuk memasukkan setiap XLSX ke dalam /pdf4metest/excel/lembar kerja terpisah/outputTelusuri folder output dan kelima file yang telah dipisah akan ada di sana, diurutkan secara alfabetis.

Satu hal yang orang lewatkan: Terapkan pada setiap tidak opsional

Excel - Lembar Kerja Terpisah mengembalikan sebuah susunan, bukan satu file tunggal. Jumlah entri bergantung pada buku kerja sumber (2 lembar masuk → 2 entri; 50 lembar masuk → 50 entri). Selalu bungkus langkah selanjutnya dengan Terapkan ke setiap item. dokumen keluaranMemilih Isi File Dari luar loop, tidak ada yang berguna yang dikembalikan. Di dalam loop, pemilih konten dinamis mengekspos Nama File Dan Isi File pada item saat ini.

Pertanyaan umum di dunia nyata yang dapat dipecahkan oleh solusi ini.

Orang-orang mencari solusi untuk masalah ini dengan frasa yang sangat spesifik. Berikut adalah pertanyaan-pertanyaan aktual yang dijawab oleh alur ini:

  • "Bagaimana cara memisahkan file Excel dengan banyak lembar kerja menjadi file terpisah secara otomatis?" Ya. Alur ini melakukan hal itu. Seret buku kerja sumber ke Dropbox, pemisahan + pengunggahan terjadi secara otomatis.
  • "Bisakah Power Automate menyimpan setiap lembar kerja sebagai file Excel terpisah?" Ya, melalui aksi PDF4me Connect ditambah perulangan "Terapkan ke setiap item". Tanpa VBA, tanpa Office Scripts.
  • "Apakah saya harus menulis satu tindakan per lembar?" Tidak. Fungsi "Terapkan ke setiap" berlaku untuk semua jumlah lembar. Isi alur kerja tidak pernah berubah.
  • "Bagaimana jika buku kerja tersebut memiliki 100 lembar?" Alurnya sama. Perulangan hanya berulang sebanyak 100 kali. Setiap iterasi berlangsung sekitar 1 detik.
  • "Bisakah saya mengganti nama file output?" Ya, buat nama baru dengan langkah Compose atau ekspresi di dalam loop sebelum Create file. Lihat bagian pemecahan masalah.

Apa yang sedang Anda bangun

Alur Power Automate empat langkah yang dapat menangani lembar kerja multi-halaman apa pun. .xlsx dan menulis satu file per lembar kerja ke folder tujuan. Dapat digunakan kembali di berbagai sistem manajemen sumber daya manusia (HR), alur penjualan yang dibagi berdasarkan wilayah, laporan bulanan yang dibagi berdasarkan bulan, atau apa pun yang memiliki beberapa tab dalam satu buku kerja.

Alur Power Automate dengan empat tindakan: Memicu alur secara manual, Dropbox Mendapatkan konten file menggunakan jalur, PDF4me Excel - Lembar Kerja Terpisah, lalu Untuk setiap Buat file (menunjukkan iterasi 1 dari 5). Waktu eksekusi 0s, 1s, 2s, 5s untuk Untuk setiap, 1s untuk Buat file.
Alur lengkapnya. Perulangan "For each" dijalankan 5 kali (sekali per lembar keluaran); setiap iterasi berlangsung sekitar 1 detik.

Apa yang Anda butuhkan

  • Power Automate akun dengan alur kerja yang terbuka di perancang cloud. Open Power Automate.
  • Kunci API PDF4me. Dapatkan kunci API AndaTambahkan koneksi PDF4me Connect saat pertama kali Anda melakukan drop-down aksi.
  • Dropbox dengan folder sumber dan folder keluaran. Semua penyimpanan dapat digunakan: SharePoint, OneDrive, Dataverse dipetakan dengan cara yang sama.
  • Buku kerja Excel multi-lembar. Unduh separate.xlsx untuk mengikuti persis (5 tab, catatan Orang).

Referensi singkat: fungsi masing-masing bagian

outputDocuments
The array the action returns. One entry per sheet. Always loop with Apply to each.
File Name (item)
Sheet name plus .xlsx extension. Pass directly into Create file File Name.
File Content (item)
Binary single-sheet workbook. Pass directly into Create file File Content.
Worksheet Indexes
Optional. Leave empty for all sheets. Comma-separated 1-based to restrict (e.g. 1,3).
Culture & Language
Defaults to en-US. Switch to fr-FR, de-DE, ja-JP, pt-BR for non-US sheet content.
Error Details Item
Itemised failure array. Empty on success; wire into a Condition for retry logic.

Mari kita lihat inputnya.

Membuka Separate.xlsx Dalam Excel. Terdapat 5 tab lembar kerja (Sheet1 hingga Sheet5), masing-masing diisi dengan baris data Orang: Nama Depan, Nama Belakang, Jenis Kelamin, Negara, Usia, Tanggal, dan ID.

File Separate.xlsx terbuka di Excel dan menunjukkan Sheet5 aktif. Kolom-kolomnya adalah nomor, Nama Depan, Nama Belakang, Jenis Kelamin, Negara, Usia, Tanggal, dan ID. Terdapat sekitar 50 baris data. Tab Sheet1, Sheet2, Sheet3, Sheet4, Sheet5 terlihat di bagian bawah.
Buku kerja sumber. Lima tab lembar di bagian bawah, masing-masing berisi sekitar 50 baris catatan Orang.
Folder sumber Dropbox /pdf4metest/excel/lembar kerja terpisah yang berisi Separate.xlsx.
Folder sumber sebelum alur kerja dijalankan. Hanya satu buku kerja.

Bangun alurnya

Tindakan 1: Memicu alur secara manual

Untuk pengujian, pemicu manual adalah yang tercepat. Dalam produksi, gantilah dengan Saat sebuah file dibuat (Dropbox), Saat suatu item dibuat (SharePoint), Saat email baru tiba (Outlook), Kambuhatau pemicu lainnya.

Aksi 2: Dropbox - Dapatkan konten file menggunakan jalur

Arahkan ke buku kerja sumber:

/pdf4metest/excel/separate worksheets/Separate.xlsx

Meninggalkan Menentukan Jenis Konten pada nilai defaultnya (Ya) di bawah Parameter lanjutan.

Dropbox Dapatkan konten file menggunakan tindakan jalur. Jalur File diatur ke /pdf4metest/excel/lembar kerja terpisah/Separate.xlsx. Parameter lanjutan Infer Content Type adalah Ya.

Aksi 3: PDF4me - Excel - Lembar Kerja Terpisah

Cari PDF4me di pemilih aksi dan pilih Excel - Lembar Kerja TerpisahKonfigurasi:

BidangNilai yang digunakan dalam proses ini
File ContentFile Content from the previous Dropbox step (dynamic content)
File NameSeparate.xlsx
Culture & Language Settings (Advanced)en-US (default. change only for non-US locales)
PDF4me Excel - Tindakan Lembar Kerja Terpisah telah dikonfigurasi. Konten File dipetakan dari Dropbox Dapatkan konten file. Nama File Terpisah.xlsx. Parameter lanjutan menunjukkan Pengaturan Budaya & Bahasa en-US.
Konfigurasi tindakan. Budaya default ke en-US. beralih ke fr-FR, Itu dia, I-JP dll. hanya jika isi lembar kerja menggunakan format angka/tanggal non-AS.

Langkah 4: Terapkan ke masing-masing → Dropbox - Buat file

Setelah tindakan Pisahkan Lembar Kerja, tambahkan Terapkan pada setiap dan pilih dokumen keluaran dari pemilih konten dinamis. Di dalam loop, seret Dropbox. Buat berkas lakukan dan konfigurasikan seperti ini:

BidangNilai yang digunakan dalam proses ini
Folder Path/pdf4metest/excel/separate worksheets/output
File NameFile Name (dynamic content from the current item)
File ContentFile Content (dynamic content from the current item)
Terapkan ke setiap perulangan yang membungkus tindakan Buat file. Menu tarik-turun pilih output menampilkan outputDocuments yang dipilih dari langkah Excel - Pisahkan Lembar Kerja sebelumnya.
Fungsi "Terapkan ke setiap" mengulangi outputDocuments. Nama File dan Isi File item saat ini akan muncul di pemilih konten dinamis di dalam perulangan.
Dropbox Buat file di dalam loop. Jalur Folder /pdf4metest/excel/lembar kerja terpisah/output. Nama File konten dinamis. Isi File konten dinamis. Terhubung ke Dropbox.
Di dalam perulangan. Nama File dan Isi File berasal dari item saat ini.

Simpan dan klik Tes. Selesai.


Hasilnya

Buka folder output di Dropbox. Kelima buku kerja lembar tunggal telah masuk, masing-masing diberi nama sesuai dengan lembar sumbernya:

Daftar folder output Dropbox: Sheet1.xlsx, Sheet2.xlsx, Sheet3.xlsx, Sheet4.xlsx, Sheet5.xlsx.
Lima buku kerja terpisah, satu untuk setiap lembar sumber, diurutkan secara alfabetis.

Unduh file output sebenarnya dari proses ini: sheet1.xlsx, sheet2.xlsx, sheet3.xlsx, sheet4.xlsx, sheet5.xlsx.


Penyelesaian Masalah

Apply to each does not show File Name / File Content
Make sure the loop is iterating outputDocuments, not the action itself. Click the Apply to each dropdown, search "outputDocuments", and pick it.
Only one file appears in the output folder
Create file is OUTSIDE the loop. Drag it inside the Apply to each container so it runs once per item.
Output files all overwrite each other
Two causes: (a) File Name is hardcoded instead of mapped to dynamic content. delete and re-pick File Name from the inner item; (b) two sheets in the source share the same name. rename them in Excel or build a unique name in a Compose step.
Decimals read as text or dates
A sheet using 1.234,56 (comma decimal) gets misinterpreted because Culture & Language Settings is en-US. Switch to your locale (fr-FR, de-DE, pt-BR, etc).
Cross-sheet formula came out as #REF!
Expected. After splitting, =Sheet2!A1 from a Sheet1 output cannot resolve because Sheet2 is now in a different file. Plan each sheet to be self-contained, or pre-compute the values upstream.
Need a date prefix on each output file name
Inside the Apply to each, add a Compose before Create file with: concat(formatDateTime(utcNow(),'yyyy-MM-dd'),'_',items('Apply_to_each')?['fileName']). Point File Name at the Compose output. Result: 2026-06-02_Sheet1.xlsx.

Kapan menggunakan pola ini?

Monthly report distribution
One workbook arrives with Jan, Feb, Mar tabs. Split, then email each tab to its owner.
Regional sales splits
Single workbook with one tab per territory becomes individual files for each regional manager.
HR roster fan-out
One company workbook with one tab per department. Upload each tab to the right SharePoint library.
Data prep for downstream tools
Many BI and accounting tools accept single-sheet inputs only. Split once, ingest many.
Compliance and auditing
Each split file is a self-contained artifact you can store, version, or sign without dragging the rest of the workbook.

Apa yang harus dibaca selanjutnya?


Pertanyaan yang Sering Diajukan (FAQ)

How do I split an Excel file with multiple sheets into separate files automatically in Power Automate?+
Use the PDF4me Excel - Separate Worksheets action. It takes a single multi-sheet .xlsx as input and returns an outputDocuments array with one file per sheet. Wrap the result in an Apply to each loop and write each item with Create file. Four actions total: trigger, Get file content, Separate Worksheets, Apply to each → Create file.
Can Power Automate save each sheet as a separate Excel file without code?+
Yes. The PDF4me Excel - Separate Worksheets action is a no-code cloud connector. There is no VBA, no Office Script, no Power Automate Desktop required. it runs entirely in the Power Automate cloud designer and outputs ready-to-save .xlsx files.
What happens if the source workbook has a different sheet count next run?+
Nothing breaks. The action dynamically returns one outputDocuments entry per sheet present, and the Apply to each iterates whatever the array length is. Build the flow once with a 5-sheet sample and it will handle 2-sheet or 200-sheet workbooks identically.
Do the output files keep their sheet names?+
Yes. Each output file is named after its source sheet name plus the .xlsx extension. Sheet5 → Sheet5.xlsx. If you have custom sheet names (e.g. "Q1 2025"), the output file is "Q1 2025.xlsx" accordingly.
Will my formulas still work after the split?+
Intra-sheet formulas (everything that references cells on the same sheet) work as expected. the engine preserves cell values, number formats, and styles. Cross-sheet references like =Sheet2!A1 cannot survive because Sheet2 is no longer in the same file; expect those to become #REF!. Plan the workbook so each sheet is self-contained, or pre-compute the values upstream.
Can I use SharePoint, OneDrive, or Dataverse instead of Dropbox?+
Yes. Swap the Dropbox actions for SharePoint Get file content / Create file, OneDrive Get file content / Create file, or Dataverse Download file / Add file. The PDF4me action and its parameters are identical regardless of source.
How do I rename the output files (add a date prefix, replace spaces, etc.)?+
Inside the Apply to each loop, add a Compose step before Create file. Build the new name with concat() and formatDateTime() expressions, then bind Create file → File Name to the Compose output. Example: concat(formatDateTime(utcNow(),'yyyy-MM-dd'),'_',items('Apply_to_each')?['fileName']) produces 2026-06-02_Sheet1.xlsx.
Is there a limit on the number of sheets I can split?+
Practical limits are bounded by Power Automate run-time and action body size. A single workbook with hundreds of sheets is fine; the loop just iterates more times. For thousands of sheets, consider Power Automate concurrency settings or batching the work across multiple runs.
Does this work in Power Automate Desktop?+
PDF4me Connect is a cloud connector available in Power Automate (the web flow designer). For Power Automate Desktop, call the same Separate Worksheets REST endpoint with the HTTP action.

Mulai