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

行を追加 Excel ワークシート n8n

行を追加する は PDF4me ノードアクション n8n それはこう書いている JSON 記録を Excel ワークシート。これを使って押し出す API 結果をレポートに書き込む、Webhook ペイロードを共有ワークブックにログ記録する、または追加する CRM 追跡シートへの輸出、実際の到着日と数字 Excel テキストではなく、値。

このノードの機能

PDF4me Excel行を追加する 既存の .xlsx ワークブックと JSON 配列 JSON 行データ、オブジェクトごとに1行を書き込みます。 2つの配置モードテーブル名を ターゲット Excel テーブル キーはヘッダーに一致します。または空白のままにして 行から挿入 プラス 列から挿入 開始セルを正確に指定します。新規にワークブックを作成するのではなく、指定したワークブックを編集します。

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

認証 API リクエスト​

毎 PDF4me ノード n8n 有効な 接続するための認証情報. 作成または選択して、 PDF4me API ワークフローがスプレッドシートのリクエストを安全に認証できるようにするためのキー。

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

ターゲット Excel テーブルがモードを決定します
入力すると、ノードはヘッダーと一致するように設定されます。空白のままにすると、座標配置に切り替わります。行の配置に関するその他のすべての設定は、この1つのフィールドに基づいて行われます。
の JSON 平らでなければならない
各オブジェクトは行となり、各キーは列となります。ネストされたオブジェクトまたは配列は、占有する単一のセルを持たないため、このノードに到達する前にペイロードをフラット化してください。
座標モードは上書きできます
「行から挿入」と「列から挿入」はどちらもデフォルトで1(左上のセル)に設定されています。既に存在する内容を置き換える場合を除き、空の領域を指定してください。
n8n の PDF4me Excel ノードで、操作を「行の追加」、Excel ファイル入力方法を「前のノードから」、JSON 行データに JSON 配列、挿入元行と挿入元列を 1 に設定し、数値と日付値の変換をオンにします。

JSON 行データには JSON 平らな物体の配列。ターゲット Excel テーブルはここでは空なので、「行から挿入」と「列から挿入」によってデータがセルA1に挿入されます。

テーブルモードと座標モードの比較​

質問テーブルモード座標モード
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

行を追加するにはどのようなパラメータが必要ですか?​

パラメータ必須その機能例
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

出力​

分野タイプ内容物
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.

更新されたワークブック自体はバイナリデータとして返され、ストレージへの書き込み、メールへの添付、または次の処理への受け渡しに使用できます。 Excel ステップ。

行を追加するにはどうすればいいですか n8n?​

  1. 追加する PDF4me Excel ノードをワークフローに追加して設定します 手術 に 行を追加する。
  2. 選択してください PDF4me 認証情報を入力するか、作成して貼り付けてください。 API 鍵。
  3. 選択してください Excel ファイル入力方法 そして、その下に表示される入力欄からワークブックを入力してください。
  4. セット ワークシート名 書き込み先の正確なシートタブに。
  5. 置く JSON 平らな物体の配列に JSON 行データ1行につき1つのオブジェクト。
  6. テーブルモードを使用するには、テーブル名を次のように入力します。 ターゲット Excel テーブル そして設定する Excel 行 Number座標を使用するには、テーブルを空白のままにして、 行から挿入 そして 列から挿入。
  7. 離れる 数値と日付の値を変換する 有効にしてから設定します 日付形式パターン、 数値フォーマットパターン、 そして 文化と言語環境 お客様のデータと照合します。
  8. セット 出力ファイル名ノードを実行し、確認します。 rowsAdded ワークブックを転送する前の応答において。

典型的な構成​

ワークフローの例Common n8n workflow patterns using Add Rows.
ウェブフックのペイロードをワークブックにログ記録する
  1. ウェブフックはフォーム送信を次のように受信します JSON。
  2. 「行の追加」機能は、共有ワークブック内の指定されたテーブルにその行を追加します。
  3. チームは、誰もデータを再入力することなく、シートを読みます。
押す API 結果をレポートにまとめる
  1. 予定されている HTTP リクエストは内部からレコードを取得します API。
  2. Codeノードは、レスポンスを単純な配列に変換します。
  3. 「行の追加」機能は、それを固定座標にレポートテンプレートに書き込みます。
毎晩追加 CRM 輸出
  1. 夜間の仕事は新たな機会をもたらし、 JSON。
  2. テーブルモードでは、キーが既存のヘッダーと一致します。
  3. ソースの列順序の変更はシートを破損させません。
配布前に書き込みを検証する
  1. Add Rows 関数は、ワークブックの横に rowsAdded オブジェクトを返します。
  2. IFノードは、入力配列の長さと比較します。
  3. 不一致が発生した場合は、短いレポートを送信する代わりにアラートが発せられます。

実践的なヒント​

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.

チートシート​

分野価値
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

よくある質問​

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.

関連アクション​

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

ヘルプが必要な場合​