Cmdlet
Set-OfficeExcelFormula
Sets a formula in a worksheet cell.
Syntax
Description
Supports A1 addresses or row/column coordinates in the Excel DSL.
Examples
Write a SUM formula.
ExcelSheet 'Data' { Set-OfficeExcelFormula -Address 'C2' -Formula 'SUM(A2:B2)' }Stores the formula in cell C2.
Parameters
- -Column Int32
- 1-based column index.
- -Formula String
- Formula text (without leading =).
- -PassThru SwitchParameter
- Emit the object created or changed by the command.
- -Row Int32
- 1-based row index.
- -Address String
- A1-style cell address (e.g., A1, C5).
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.