Collapse/expand columns in a table

Please don’t post multiple times. Answered here: Table view: expand, collapse columns