Skip to main content

Set Cell Value

Sets the value of a specific cell in an Excel worksheet stored in OneDrive or SharePoint.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is set to true, no error is caught when the project is executed even if a Catch node is used.

Input

  • Client Id - The client ID from the Connect node (optional if using direct credentials).
  • Workbook Id - The workbook ID from Get Workbook or Create Workbook node.
  • Worksheet Name - Name of the worksheet to write to (e.g., Sheet1). Default is "Sheet1".
  • Cell Address - Cell address in A1 notation (e.g., A1, B2, C3, AA10).
  • Cell Value - The value to write to the cell. Can be text, number, or boolean.

Options

  • Credentials - OAuth2 credentials (optional, alternative to using Client ID).

Output

  • Success - True if the cell value was set successfully.
  • Cell Address - The cell address that was updated.

Examples

Write Text to Cell:

// Input
Client Id: ${client_id}
Workbook Id: ${workbook_id}
Worksheet Name: "Sheet1"
Cell Address: "A1"
Cell Value: "Sales Report"

// Output
success: true
cell_address: "A1"

Write Number:

// Input
Cell Address: "D10"
Cell Value: 1234.56

// The value is written as a number, not text

Write Formula Result:

// Input
Cell Address: "E1"
Cell Value: ${calculated_total}

// Writes the result of a calculation

Update Multiple Cells:

Get Workbook
→ Set Cell Value (A1: "Name")
→ Set Cell Value (B1: "Amount")
→ Set Cell Value (A2: "John")
→ Set Cell Value (B2: 100)

Cell Value Types

The node automatically handles different value types:

  • Text: "Hello", "Sales Data"
  • Numbers: 123, 45.67, -10.5
  • Booleans: true, false
  • Empty: null or empty string clears the cell

Use Cases

  • Write headers to cells
  • Update specific calculated values
  • Set status flags or indicators
  • Write summary data to known cells
  • Update configuration values
  • Clear individual cells

Tips

  • Changes are saved automatically - no separate save operation needed
  • For writing multiple cells, use Set Range for better performance
  • Cell addresses are not case-sensitive
  • The cell is created if it doesn't exist
  • Previous cell value is overwritten
  • For formulas, use the Set Formula node instead

Common Errors

ErrInvalidArg - "Workbook ID cannot be empty"

  • Solution: Ensure you've called Get Workbook first and passed the workbook_id

ErrInvalidArg - "Cell address cannot be empty"

  • Solution: Provide a cell address in A1 notation (e.g., A1, B2, C3)

ErrNotFound - "Cell not found in worksheet"

  • Solution: Verify the worksheet name is correct

ErrGraph - "Failed to set cell value"

  • Solution: Check that you have write permissions to the file