Group 方法
語法
procedure Group(Rows: boolean = true);
| Rows |
Boolean(選用)。True 表示群組列;False 表示群組欄。預設值為 True |
範例
Workbook.Sheets[1].Range['A1', 'A3'].Group;
Workbook.Sheets[1].Range['A1', 'A3'].Group(True);
This example is the same to previous
Workbook.Sheets[1].Range['A1', 'A3'].Rows.Group;
This example is the same to previous
Workbook.Sheets[1].Range['A1', 'A3'].Rows.Group(True);
This example groups three first columns on sheet one
Workbook.Sheets[1].Range['A1', 'C1'].Group(False);
This example is the same to previous
Workbook.Sheets[1].Range['A1', 'C1'].Columns.Group;
This example is the same to previous
Workbook.Sheets[1].Range['A1', 'C1'].Columns.Group(False);
This example groups rows row1 through row2
Workbook.Sheets[1].RCRange[row1, 1, row2, 1].Group;
This example groups columns col1 through col2
Workbook.Sheets[1].RCRange[1, col1, 1, col2].Columns.Group;
另請參閱