Actions7
Row → Insert Row
AI-generatedSummary
Inserts a new row at a specified position in an Excel file using JSON data, mapping column names to indices.
Inputs
- inputMode (required) — Method to provide the Excel file: 'filePath' for a local file path or 'binaryData' for a binary property.
- filePath (required) — Absolute path to the Excel file (required when inputMode is 'filePath').
- binaryPropertyName (required) — Name of the binary property containing the Excel file (required when inputMode is 'binaryData').
- sheetName — Name of the worksheet to operate on. If not specified, the first worksheet is used.
- rowNumber (required) — Target row number to insert the new row (1-based, row 1 is the header).
- rowData (required) — Row data as a JSON object; column names are automatically mapped to Excel columns.
- autoSave — Whether to automatically save changes to the file when using file path mode (default: true).
Output shape
A single item containing a success status, the operation performed, the row number, the data inserted, and a confirmation message.
If autoSave is disabled, the file is modified in memory and only saved when outputting binary data (binaryData mode) or when autoSave is true.
Examples
Example 1: Insert a row with contact details into an existing file at row 5.
InputMode: filePath, FilePath: /data/contacts.xlsx, SheetName: Contacts, RowNumber: 5, RowData: {"Name": "Alice", "Role": "Developer", "Email": "alice@example.com"}, AutoSave: true
Example 2: Insert a new product row at row 2 in a sales spreadsheet.
InputMode: filePath, FilePath: /data/sales.xlsx, SheetName: Sales, RowNumber: 2, RowData: {"Product": "Widget", "Price": 15.99, "Stock": 100}