Lewati ke konten utama

Tambahkan Baris ke sebuah Excel Lembar kerja di n8n

Tambahkan Baris adalah sebuah PDF4me tindakan node di n8n yang menulis JSON catatan ke dalam sebuah Excel Lembar kerja. Gunakan untuk mendorong API hasil ke dalam laporan, mencatat muatan webhook ke buku kerja bersama, atau menambahkan CRM Ekspor ke lembar pelacakan, dengan angka dan tanggal yang tercatat secara nyata. Excel nilai-nilai, bukan teks.

Fungsi node ini

PDF4me Excel: Tambahkan Baris mengambil yang sudah ada .xlsx buku kerja ditambah sebuah JSON array di JSON Data Baris, dan menulis satu baris per objek. Ia memiliki dua mode penempatan: sebutkan nama tabel di Target Excel Meja dan kunci dicocokkan dengan header, atau biarkan kosong dan Sisipkan Dari Baris ditambah Sisipkan Dari Kolom Tetapkan sel awal yang tepat. Program ini mengedit buku kerja yang Anda berikan, bukan membuat buku kerja dari awal.

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 spreadsheet dengan aman.

Fakta Penting yang Tidak Boleh Anda Lewatkan

Target Excel Tabel menentukan modenya
Mengisi kolom ini akan mengalihkan node ke pencocokan header. Membiarkannya kosong akan mengalihkan ke penempatan koordinat. Semua hal lain tentang bagaimana baris ditempatkan mengikuti dari kolom tersebut.
Yang JSON harus rata
Setiap objek menjadi baris dan setiap kunci menjadi kolom. Objek atau larik bersarang tidak memiliki sel tunggal untuk ditempati, jadi ratakan muatan sebelum mencapai simpul ini.
Mode koordinat dapat menimpa
Baik opsi Sisipkan Dari Baris maupun Sisipkan Dari Kolom secara default bernilai 1, yaitu sel paling kiri atas. Arahkan keduanya ke area kosong kecuali Anda bermaksud mengganti isi yang sudah ada.
Node PDF4me Excel di n8n dengan Operasi diatur ke Tambah Baris, Metode Input File Excel diatur ke Dari Node Sebelumnya, array JSON di Data Baris JSON, Sisipkan Dari Baris dan Sisipkan Dari Kolom diatur ke 1, dan Konversi Nilai Numerik dan Tanggal diaktifkan.

JSON Data Baris menyimpan JSON susunan objek datar. Target Excel Tabel di sini kosong, jadi Sisipkan Dari Baris dan Sisipkan Dari Kolom akan menempatkan data di sel A1.

Mode Tabel vs Mode Koordinat

PertanyaanMode tabelMode koordinat
How you switch to itName a table in Target Excel TableLeave Target Excel Table blank
How columns are matchedJSON keys matched against table headersValues written in key order from the start cell
Does column order matterNo, headers drive placementYes, position drives placement
Which fields control itTarget Excel Table and Excel Row NumberInsert From Row and Insert From Column
Best forStructured sheets that already have a tableBlank sheets or a fixed reporting layout
Overwrite riskLower, rows follow the table structureHigher, the start cell is written to directly

Parameter apa saja yang dibutuhkan untuk menambahkan baris?

ParameterDiperlukanApa fungsinya?Contoh
Credential to connect withRequiredThe PDF4me API credential the node authenticates with.PDF4me API
OperationRequiredThe action this node performs. Select Add Rows.Add Rows
Excel File Input MethodRequiredHow the workbook reaches the node: from the previous node as binary data, as a Base64 string, or from a URL.From Previous Node (Binary Data)
Binary Data Property NameConditionalName of the binary property holding the .xlsx. Appears when the workbook comes from the previous node.data
Worksheet NameRequiredSheet the rows are written to. Match the sheet tab name exactly.Sheet1
JSON Row DataRequiredJSON array of flat objects. Each object becomes one row and each key maps to a column.[{"Date":"2024-01-15","Amount":1500.00}]
Insert From RowConditionalRow number the data starts at, counting from 1. Used in coordinate mode when no table is named.1
Insert From ColumnConditionalColumn number the data starts at, counting from 1 for column A. Used in coordinate mode.1
Target Excel TableOptionalName of an existing table to write into. Filling this in switches the node to header matching instead of coordinates.Table1
Excel Row NumberConditionalRow index inside the named table where insertion begins. Used in table mode.1
Convert Numeric and Date ValuesOptionalToggle that turns numeric and date strings into real Excel values rather than text. Ships enabled.enabled
Date Format PatternOptionalPattern applied to converted dates. Match it to the shape of the dates in your JSON.yyyy-MM-dd
Numeric Format PatternOptionalFormat applied to converted numbers, such as two decimal places.N2
Skip JSON Property NamesOptionalToggle that omits the JSON keys, writing only values. Ships disabled so headers are included.disabled
Skip Null ValuesOptionalToggle that leaves cells untouched where a JSON value is null instead of clearing them. Ships disabled.disabled
Culture and Language SettingsOptionalCulture code used when parsing numbers and dates, which decides separator handling.en-US
Output File NameOptionalFilename of the returned workbook. Keep a valid Excel extension.excel_with_rows.xlsx

Keluaran

BidangJenisIsi di dalamnya
fileNameStringName of the returned workbook after the rows were written.
fileSizeNumberSize of the returned workbook in bytes.
successBooleanWhether the insertion completed. Branch on this so failures surface as alerts.
originalFileNameStringName of the input workbook as supplied to the node.
worksheetNameStringThe worksheet the rows were written to.
rowsAddedNumberHow many rows were inserted. The most useful verification signal the node returns.
insertFromRowNumberStarting row used, echoed back when running in coordinate mode.
insertFromColumnNumberStarting column used, echoed back when running in coordinate mode.
tableNameStringThe table written into, or null when coordinate mode was used.
excelRowNumberNumberRow index inside the table where insertion began, in table mode.
convertNumericAndDateBooleanWhether numeric and date conversion was applied.
dateFormatStringThe date pattern applied during conversion.
numericFormatStringThe numeric format applied during conversion.
cultureNameStringThe culture code used to parse numbers and dates.
messageStringHuman-readable summary, including the row count and worksheet name.

Buku kerja yang telah diperbarui itu sendiri dikembalikan sebagai data biner, siap untuk ditulis ke penyimpanan, dilampirkan ke email, atau diteruskan ke proses selanjutnya. Excel melangkah.

Bagaimana Cara Mengatur Penambahan Baris di n8n?

  1. Tambahkan PDF4me Excel Tambahkan node ini ke alur kerja Anda dan atur. Operasi ke Tambahkan Baris.
  2. Pilih Anda PDF4me atau buat yang baru dan tempelkan kredensial Anda API kunci.
  3. Pilih salah satu Excel Metode Input File dan masukkan buku kerja melalui kolom yang muncul di bawahnya.
  4. Mengatur Nama Lembar Kerja ke tab lembar kerja yang tepat yang sedang Anda tulis.
  5. Letakkan JSON susunan objek datar menjadi JSON Data Baris, satu objek per baris.
  6. Untuk menggunakan mode tabel, masukkan nama tabel di Target Excel Meja dan mengatur Excel Baris NumberUntuk menggunakan koordinat, biarkan tabel kosong dan atur Sisipkan Dari Baris Dan Sisipkan Dari Kolom.
  7. Meninggalkan Mengonversi Nilai Numerik dan Tanggal diaktifkan, lalu diatur Pola Format Tanggal, Pola Format Numerik, Dan Latar Belakang Budaya dan Bahasa untuk mencocokkan data Anda.
  8. Mengatur Nama File Output, jalankan node tersebut, dan periksa rowsAdded dalam respons sebelum meneruskan buku kerja tersebut.

Pengaturan Umum

Contoh Alur KerjaCommon n8n workflow patterns using Add Rows.
Mencatat muatan webhook ke dalam buku kerja.
  1. Webhook menerima pengajuan formulir sebagai JSON.
  2. Fungsi Tambah Baris menambahkan data ke tabel bernama di buku kerja bersama.
  3. Tim tersebut membaca lembar kerja tanpa ada yang memasukkan data ulang.
Dorongan API menghasilkan laporan
  1. Terjadwal HTTP Permintaan tersebut mengambil data dari internal. API.
  2. Node Kode meratakan respons menjadi array biasa.
  3. Fungsi Tambah Baris menuliskannya ke dalam templat pelaporan pada koordinat tetap.
Tambahkan harian CRM ekspor
  1. Pekerjaan malam hari membuka peluang baru karena JSON.
  2. Mode tabel mencocokkan kunci dengan header yang sudah ada.
  3. Perubahan urutan kolom pada sumber data tidak akan merusak lembar kerja.
Verifikasi penulisan sebelum didistribusikan.
  1. Fungsi Tambah Baris mengembalikan baris yang ditambahkan bersama dengan buku kerja.
  2. Node IF membandingkannya dengan panjang array input.
  3. Ketidaksesuaian akan memicu peringatan alih-alih mengirimkan laporan singkat.

Tips Praktis

Flatten the JSON first
A Set or Code node that removes nesting is cheaper than debugging why a column arrived empty or full of object text.
Prefer table mode when a table exists
Header matching survives column reordering in the source system, which fixed coordinates cannot.
Check rowsAdded, not just success
A run can succeed while inserting fewer rows than you sent. Comparing the count to your array length catches silent shortfalls.
Match culture to the data, not the reader
Culture drives how decimal and thousands separators are parsed. Set it to the format the JSON arrives in.
Point coordinates at empty cells
Insert From Row and Insert From Column both default to 1, so an unchanged run writes over the top-left of the sheet.
Keep a template workbook
This action edits an existing file. Storing a clean template that the workflow copies each run avoids gradual drift.

Lembar Panduan Singkat

BidangNilai
OperationAdd Rows
Excel File Input MethodFrom Previous Node (Binary Data)
Binary Data Property Namedata
Worksheet NameSheet1
JSON Row Data[{"Date":"2024-01-15","Amount":1500.00}]
Insert From Row / Column1 / 1
Target Excel TableTable1
Excel Row Number1
Convert Numeric and Date Valuesenabled
Date Format Patternyyyy-MM-dd
Numeric Format PatternN2
Culture and Language Settingsen-US
Output File Nameexcel_with_rows.xlsx

Pertanyaan Umum

What JSON format does Add Rows expect?+
A JSON array of flat objects, where each object is one row and each key is a column. Nested objects and arrays have no natural cell to land in, so flatten the structure first, for example with an n8n Code node. The array shape itself follows the ordinary JSON data model.
What is the difference between table mode and coordinate mode?+
Naming a table in Target Excel Table puts the node in table mode, where JSON keys are matched against the table headers so column order in your data does not matter. Leaving it blank uses coordinate mode, where Insert From Row and Insert From Column decide the exact starting cell and values are written in key order.
Why did my numbers and dates arrive as text?+
That happens when Convert Numeric and Date Values is turned off, or when the culture does not match the incoming data. The toggle ships enabled, and Date Format Pattern, Numeric Format Pattern, and Culture and Language Settings control how the strings are parsed and formatted on the way in.
Does Add Rows overwrite existing data?+
In coordinate mode the node writes starting at the row and column you name, so pointing it at occupied cells replaces what is there. Target an empty region, or use table mode so rows follow the table structure rather than a fixed address.
Can I add rows to several sheets in one run?+
Not in a single execution, because Worksheet Name takes one sheet. Chain a second Add Rows node fed by the first node output, or loop the workbook through the node once per sheet, so each pass writes to its own worksheet.

Tindakan Terkait

Tugas yang Sama di Platform Lain

Dapatkan Bantuan