Excel Write
ExcelWrite adds a row of data to an Excel spreadsheet file. The row is added to the bottom of a specified sheet, optionally above a defined footer section.
Properties
File path
The file path to the xlsx file to write to.
File does not exist
The action to take when the specified file does not exist.
Options:
Create file creates a blank spreadsheet file to write to.
Copy template copies the template file to the destination file path before adding the row.
Throw exception will stop the process and report an error.
Template file
The file path to a xlsx file to copy when no file exists at the destination file path.
Only displayed when the File does not exist option is set to 'Copy template'.
Sheet name
The name of the sheet to write to. If the file does not contain a sheet with the specified name, a new sheet with that name will be created.
The number of rows to leave at the bottom of the sheet. The row will be inserted at the specified number of lines above the bottom of the sheet.
Values
The collection of values to insert into the new row.
Click the ... icon to open the Row Editor, which can be used to add Column-Value pairs.
Links
Formula Recalculation
The Excel plugin does not support programmatic recalculation of formula cells. After writing data using the ExcelWrite function, open the Excel file to trigger automatic recalculation of all formula cells. Function values are only calculated by Excel and trigger once the workbook is opened.
Data Formatting Requirements
Format cells containing formula dependencies correctly before saving:
Set explicit data types when writing data programmatically to ensure proper formula recalculation
Ensure data is entered in the correct format when inputting data into cells
Format cells as appropriate types (Number, General) rather than text
Avoid text formatting for numeric data as this prevents formula recalculation
This ensures formulas recalculate correctly when the file opens in Excel.
Last updated