-
-
Notifications
You must be signed in to change notification settings - Fork 39
groupColumns
Julian Halliwell edited this page Apr 15, 2025
·
2 revisions
Creates a group of columns which can be visually collapsed and expanded.
groupColumns( workbook, startColumn, endColumn )
-
workbook
spreadsheet object -
startColumn
numeric: the column at which the group begins (inclusive) -
endColumn
numeric: the column at which the group ends (inclusive)
Chainable? Yes.
spreadsheet = New spreadsheet();
workbook = spreadsheet.newXlsx();
rowData = [ "column1", "column2", "column3", "column4" ];
spreadsheet
.addRows( workbook, [ rowData, rowData, rowData, rowData ] );//add a 4x4 dataset
.groupColumns( workbook, 2, 3 );// group columns 2-3
.collapseColumnGroup( workbook, 2 ); //the columns 2 and 3 will now be collapsed: hidden but expandable in the UI