navferty / NavfertyExcelAddIn

Common tools for MS Excel
MIT License
47 stars 6 forks source link

Merge cells by columns in selected range #55

Open navferty opened 4 years ago

navferty commented 4 years ago

Problem: user cannot merge selected range by each column at once

There is native feature of merging cells in each row of selected range:

image

Despite that, there is no way to merge cells in each column. Automatically merged rows are coloured with grey, manually merged cells in each column are coloured with yellow:

image

Describe the solution you'd like There should be a button to merge cells in selection by each column. The action is available only when there is sinle area selected, and this area does not contain merged cells.

Additional context The undo of merge/unmerge function does not match the existing solution of "undo" feature. To provide the ability of undo merge/unmerge action, new undo strategy must be implemented. As long as currently existing UndoManager can store history of modifying cell values with EnumerableExtensions.ApplyForEachCellOfType method, new undo manager should store "merge structure". The click on Undo button dynamically detect last action type, and invoke UndoLastAction on appropriate undo manager.