Write Value To Excel File Step
The "Write Value To Excel File" step puts a value into a specific cell in an Excel file. You use this step to update or add data to an Excel sheet that already exists as part of a process.
What You'll Need
- An Excel file you've opened using the "Open Excel File" step.
- The name of the Excel connection from the "Open Excel File" step.
How to Use the Write Value To Excel File Step
Add this step to your process to put data into an Excel cell.
Step 1: Add the Step to Your Process
- Drag the "Write Value To Excel File" step into your process workflow.
- Click on the step to open its settings.
Step 2: Set Up the Excel Connection
- In the Excel instance name field, pick the unique connection name you set in the "Open Excel File" step.
Step 3: Pick the Cell Location
You need to give either a column number or a column letter, but not both.
Option A: Use Column Number
- In the Column index field, type the column's number (e.g.,
1for column A,2for column B). - In the Row index field, type the row's number (e.g.,
1for the first row).
Option B: Use Column Letter
- In the Column name field, type the column's letter (e.g.,
A,B,C). - In the Row index field, type the row's number (e.g.,
1for the first row).
Step 4: Pick the Sheet and Value
- In the Sheet name field, type the name of the Excel sheet (e.g.,
Sheet1). - In the Value or variable reference to write field, type the value you want to write. You can also type the name of a variable that holds the value.
Parameters Explained
Step name (Optional)
- A custom name for this process step.
- Example:
Write Customer Name to Excel - Use this to make your process easier to follow.
Excel instance name (Required)
- The unique name of the Excel connection.
- Example:
MyExcelData - This value comes from the "Open Excel File" step.
Column index (Required if 'Column name' is empty)
- The column's number.
- Example:
3(for column C) - Use this if you know the column number.
Column name (Required if 'Column index' is empty)
- The column's letter.
- Example:
B - Use this if you know the column letter.
Row index (Required)
- The row's number.
- Example:
5 - This tells the step which row to write to.
Sheet name (Required)
- The name of the Excel sheet.
- Example:
Data - This tells the step which sheet to use.
Value or variable reference to write (Required)
- The data to put into the cell.
- Example:
Hello WorldormyVariableName - This can be a direct value or a variable.
Common Issues
Problem: The step fails with an error about the Excel connection. Solution: Make sure you have an "Open Excel File" step before this one. Check that the Excel instance name matches exactly.
Problem: The value goes into the wrong cell. Solution: Double-check your Column index or Column name and Row index values. Make sure the Sheet name is correct.
Related Articles
- Open Excel File Step and Close Excel File Step
- Read Value From Excel File Step
- Assign Excel Cell Value To Variable Step
- Save Data Table To Excel File Step
Need Help?
Can't find what you're looking for? Join the Robotiq Community to get help from other users and the Robotiq team.