Lewati ke konten utama

Hapus Baris dari Excel Lembar kerja di n8n

Hapus Baris adalah sebuah n8n modul oleh PDF4me yang menghilangkan baris yang tidak diinginkan dari Excel Lembar kerja dalam satu langkah alur kerja. Kirim buku kerja dan string Rentang Baris yang mencakup baris tunggal, rentang, atau daftar campuran, dan PDF4me Menghapusnya dari bawah ke atas dan mengembalikan file yang sudah dibersihkan.

Fungsi node ini

PDF4meHapus Baris Menghapus baris header, baris kosong, atau bagian yang sudah usang dari sebuah Excel lembar kerja langsung di n8nSediakan buku kerja sebagai data biner, Base64, atau sebuah URL, targetkan lembar kerja tertentu atau biarkan kosong untuk lembar pertama, dan berikan string Rentang Baris berbasis 1 (baris tunggal, rentang, atau campuran). Mengembalikan buku kerja yang telah dibersihkan dengan baris yang diminta dihapus. Ideal untuk membersihkan ekspor sebelum dibagikan, memangkas templat, atau menghapus catatan yang masa retensinya telah berakhir.

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

Memverifikasi Identitas Anda API Meminta

Setiap PDF4me simpul di n8n memerlukan validitas Kredensial untuk terhubung denganBuat atau pilih salah satu yang sesuai dengan kebutuhan Anda. PDF4me API kunci agar alur kerja dapat mengautentikasi permintaan penghapusan baris secara aman.

Fakta Penting yang Tidak Boleh Anda Lewatkan

Penghapusan berjalan dari bawah ke atas
PDF4me Menghapus baris yang ditentukan mulai dari bagian bawah rentang ke atas. Ini menghindari masalah pergeseran indeks baris yang terjadi dengan penghapusan dari atas ke bawah yang sederhana.
Nomor baris dimulai dari 1.
Baris 1 adalah baris pertama dalam lembar kerja, sesuai dengan apa yang Anda lihat di ExcelHeader barisnya. Tidak ada baris 0.
Rentang Baris menerima daftar campuran.
Gabungkan baris tunggal dan rentang dalam satu string, misalnya 1-3, 10, 25-30, untuk menghapus beberapa bagian yang tidak berdekatan dalam satu eksekusi node.
Node PDF4me Excel Delete Rows n8n dikonfigurasi dengan Kredensial API PDF4me, Operasi Hapus Baris, Metode Input File Excel Dari Node Sebelumnya Data Biner, Nama Properti Data Biner data, Nama Lembar Kerja Sheet1 placeholder, Rentang Baris 10-20, Nama File Output excel_rows_deleted.xlsx, Nama Dokumen Sumber myExcelFile.xlsx, dan Nama Data Biner Output data.

Panel node lengkap: buku kerja melalui Data Biner, Rentang Baris 10-20 pada Sheet1

Parameter

Diperlukan dalam n8n UI: Excel Metode Input File, Nama Dokumen Sumber, dan Rentang Baris. Nama Lembar Kerja (defaultnya adalah lembar pertama), Nama File Output (default excel_baris_yang_dihapus.xlsx), dan Nama Data Biner Keluaran (default data) bersifat opsional. Bidang sumber buku kerja bersyarat (Nama Properti Data Biner, Base64 Isi Dokumen, Dokumen URL) hanya muncul saat pencocokan Excel Metode Input File telah dipilih.

ParameterDiperlukanApa fungsinya?Contoh
Excel File Input MethodRequiredHow the workbook enters the node. From Previous Node (Binary Data) reads from a prior node (default). Base64 String accepts an encoded workbook. URL downloads it from a public link.From Previous Node (Binary Data)
Binary Data Property NameConditionalName of the binary property on the incoming n8n item that holds the workbook. Required when Excel File Input Method is Binary Data. Defaults to data.data
Base64 Document ContentConditionalBase64-encoded workbook content. Required when Excel File Input Method is Base64 String.UEsDBBQAAAA...
Document URLConditionalPublicly reachable HTTPS link to the workbook. Required when Excel File Input Method is URL.https://files.example.com/report.xlsx
Worksheet NameOptionalWorksheet to clean. Leave blank to target the first sheet in the workbook.Summary
Row RangesRequiredRow range string with 1-based row numbers. Accepts single rows, ranges, or a mixed comma-separated list. Rows are deleted bottom-to-top.1-3,10,25-30
Output File NameOptionalFilename of the cleaned workbook returned by the node. Default is excel_rows_deleted.xlsx.excel_rows_deleted.xlsx
Source Document NameRequiredLogical filename of the source workbook, used for reference and tracking in the response.myExcelFile.xlsx
Output Binary Data NameOptionalName of the binary property the output item exposes. Default is data. Use a different name when a downstream node expects it.data

Kolom apa saja yang termasuk dalam output?

BidangJenisIsi di dalamnya
fileNameStringName of the output workbook after row deletion, set from Output File Name (default excel_rows_deleted.xlsx).
fileSizeNumberSize of the output workbook in bytes.
successBooleanTrue when the row deletion completed successfully. Use to route error-handling branches.
originalFileNameStringThe Source Document Name that was processed, kept for audit trails.
worksheetNameStringName of the worksheet where rows were deleted.
rowRangesStringThe Row Ranges string that was used for this deletion.
messageStringDescriptive status message including the row ranges and worksheet name.
Binary (data)BinaryThe cleaned workbook under Output Binary Data Name (default data). Pass into Write Binary File, Email, or any storage upload.

Bagaimana Cara Mengatur Penghapusan Baris di n8n?

  1. Tambahkan PDF4me Excel simpul ke Anda n8n alur kerja dan pengaturan Operasi ke Hapus Baris.
  2. Di dalam Kredensial untuk terhubung dengan, pilih milikmu PDF4me kredensial atau klik Buat Kredensial Baru dan tempelkan milik Anda API kunci.
  3. Mengatur Excel Metode Input File ke Dari Node Sebelumnya (Data Biner) (bawaan), Base64 String, atau URL dan isi kolom yang sesuai.
  4. Memasuki Nama Dokumen Sumber, nama file logis dari buku kerja, untuk referensi dan pelacakan.
  5. Masukkan Rentang Baris string dengan nomor baris berbasis 1, rentang, atau daftar campuran seperti 1-3,10,25-30.
  6. Pengaturan opsional Nama Lembar Kerja Untuk menargetkan lembar tertentu. Biarkan kosong untuk menargetkan lembar pertama.
  7. Ubah secara opsional Nama File Output dari default excel_rows_deleted.xlsx Dan Nama Data Biner Keluaran dari default data.
  8. Jalankan node dan arahkan buku kerja yang telah dibersihkan ke Write Binary File, Email, atau penyimpanan cloud.

Pengaturan Umum

Contoh Alur KerjaCommon n8n workflow patterns using Delete Rows.
Pembersihan laporan sebelum pengiriman ke klien.
  1. Node Unduhan Google Drive menarik buku kerja laporan internal (Data Biner, properti) data).
  2. PDF4me Perintah Hapus Baris dijalankan dengan Rentang Baris yang menargetkan baris catatan internal dan baris pemisah kosong.
  3. Node Write Binary File menyimpan buku kerja yang siap digunakan klien dengan cara $json.fileName.
Persiapan template untuk pengguna baru
  1. Node Baca File Biner memuat master. Excel templat.
  2. PDF4me Opsi Hapus Baris menghapus baris data contoh sebelum templat didistribusikan, dengan Nama Lembar Kerja diatur ke lembar yang berisi baris contoh.
  3. Templat yang sudah dibersihkan diunggah ke folder onboarding bersama.
Pembersihan terjadwal di area penampungan air
  1. Node Cron akan dijalankan setiap minggu pada buku kerja catatan yang tersimpan di lokasi tetap. URL.
  2. Langkah sebelumnya menghitung string Rentang Baris untuk catatan yang masa retensinya telah berakhir dan meneruskannya ke PDF4me Hapus Baris dengan Excel Metode Input Berkas diatur ke URL.
  3. Buku kerja yang telah dibersihkan akan menimpa file sumber di penyimpanan cloud.

Tips Praktis

Row numbers are 1-based, not 0-based
Row 1 is the first row in the worksheet, the same numbering you see in Excel itself. A common mistake is assuming index 0 is the first row.
Bottom-to-top deletion avoids shift bugs
You do not need to recalculate row numbers after each deletion. PDF4me processes the Row Ranges list from the bottom up internally.
Combine ranges in one call
Instead of running the node multiple times, pass a single mixed string like 1-3,10,25-30 to delete several sections in one execution.
Set Worksheet Name for multi-sheet workbooks
Leaving Worksheet Name blank always targets the first sheet. Set it explicitly whenever the workbook has more than one sheet.
Output File Name is separate from Source Document Name
Source Document Name tracks the input file. Output File Name controls what the cleaned workbook is called when it comes back, default excel_rows_deleted.xlsx.
Double-check the range before automating
An incorrect Row Ranges string deletes the wrong rows with no built-in undo. Test with a copy of the workbook before wiring this into a production schedule.

Lembar Panduan Singkat

BidangNilai
OperationDelete Rows
Excel File Input MethodFrom Previous Node (Binary Data)
Binary Data Property Namedata
Worksheet NameSheet1
Row Ranges10-20
Output File Nameexcel_rows_deleted.xlsx
Source Document NamemyExcelFile.xlsx
Output Binary Data Namedata
CredentialsPDF4me API credential

Pertanyaan yang Sering Diajukan

How do I delete specific rows from an Excel file in n8n?+
Add the PDF4me Excel node, set Operation to Delete Rows, provide the workbook via binary data, Base64, or URL, and enter a Row Ranges string such as 1-3,10,25-30. The node deletes those rows and returns the cleaned workbook.
Can I delete multiple non-contiguous row ranges in one action?+
Yes. Row Ranges accepts a comma-separated mix of single rows and ranges in one string. For example, 1-3,10,25-30 deletes rows 1 through 3, row 10, and rows 25 through 30 in a single execution, no looping required.
Does deleting rows shift my remaining data incorrectly?+
No. PDF4me deletes the specified rows starting from the bottom of the range and working upward, which avoids the row-index-shifting problem that occurs when rows are removed top-down and remaining indexes change mid-operation.
What happens if I leave Worksheet Name blank?+
The action targets the first worksheet in the workbook by default. Set Worksheet Name explicitly when the workbook has multiple sheets and you need to clean a sheet other than the first one.
Are row numbers 0-based or 1-based in the Row Ranges field?+
Row numbers are 1-based, matching Excel row headers directly. Row 1 is the first row in the sheet; there is no row 0.

Tindakan Terkait

Tugas yang Sama di Platform Lain

Kasus Penggunaan

  • Pembersihan laporanHapus catatan internal, total, atau pemisah kosong sebelum dikirim ke klien.
  • Persiapan templat: Hapus baris contoh dari Excel templat sebelum melakukan onboarding pengguna baru.
  • Alur kerja kepatuhanHapus secara otomatis data yang sudah kedaluwarsa atau baris yang masa penyimpanannya telah berakhir.

Dapatkan Bantuan