Repository navigation
[excel] Add lots of Range samples - #469
Alison McKay (alison-mk) wants to merge 1 commit into
Conversation
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit a9f8baf: ✅ Validation status: passed
For more details, please refer to the build report. |
There was a problem hiding this comment.
🟢 Approval recommended
The samples align with documented API contracts, and no blocking issues were identified.
No open issues 🎉
What changed in this PR
Expands the Office Scripts API documentation with examples for ExcelScript.Range methods.
Changes:
- Adds samples for range navigation, formatting, formulas, and values.
- Demonstrates dependencies, dynamic arrays, cell controls, and grouping.
| File | Description |
|---|---|
| docs/sample-scripts/samples.yaml | Adds method-specific Range samples for API documentation. |
Review effort: Balanced
Alex Jerabek (AlexJerabek)
left a comment
There was a problem hiding this comment.
I ran every script and things look good. I had a couple observations for your consideration.
| 'ExcelScript.Range#clearOrResetContents:member(1)': | ||
| - |- | ||
| /** | ||
| * This script resets checked checkboxes without removing their controls. |
There was a problem hiding this comment.
Technically, this script does overwrite the cells by creating new checkboxes. Consider reworking this to tell the user to manually add checked checkboxes to the range.
| * This script highlights the region around the active cell bounded by blank rows and columns. | ||
| */ | ||
| function main(workbook: ExcelScript.Workbook) { | ||
| const region = workbook.getActiveCell().getSurroundingRegion(); |
There was a problem hiding this comment.
Nit: This throws an exception if you don't have any cells if data adjacent to the currently selected cell. Maybe add that need as a note?
Adding samples for all the range methods that didn't previously have samples.