set_formula
Write formulas to single cells or ranges in Excel workbooks. Handles relative-reference shifting like Excel copy/paste, preserves absolute anchors, and ensures modern functions recalculate on open.
Instructions
Write a formula to a single cell, or fill a range where each cell gets the formula with its relative references shifted by that cell's offset (Excel copy semantics; absolute $ anchors stay put). Formulas are normalized so modern functions do not land as #NAME?, and the workbook is flagged to recalculate on its next open; stored cached results stay stale until then (the recalculate tool in the com pack populates them). Auto-backup to .ks4xl-backups; atomic verified save. Refuses while open in Excel.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| sheet | No | ||
| backup | No | ||
| formula | Yes | ||
| location | Yes | ||
| allow_loss | No | ||
| verify_com | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||