pkabirrvelixo
Jan 23, 2025Iron Contributor
Status:
New
Undo stack shouldn't get cleared after setting rowHidden/columnHidden property through the API
Our accounting-oriented add-in provides a feature that is triggered upon recalculation and hides certain report rows (e.g. financial accounts with no balances or activity) that do not interest the report reader.
Unfortunately, this clears the Undo stack and is a source of one of the most frequent customer complaints.
The following ScriptLab snippet illustrates the problem: Undo stack: rowHidden
Steps to replicate:
- Attach the ScriptLab snippet (run in the current pane)
- Type "foo" into cell A1
- Undo the operation
- Type "foo" into cell A1 again
- Click the "Hide/unhide first row" in the side panel. It will hide and unhide row 1.
- Click "Undo" – nothing happens (or Undo operation is not available, depending on the platform)
Expected result:
Setting rowHidden or columnHidden properties of the range should not clear the Undo stack.
- macgCopper Contributor
Good luck with this one! Making visual changes to the worksheet has always cleared the Undo/Redo stacks. That has been the single biggest problem with Excel for decades.