HotXLS 文件

Group 方法

降低範圍的層級(增加其大綱層級)

語法

procedure Group(Rows: boolean = true);
Rows Boolean(選用)。True 表示群組列;False 表示群組欄。預設值為 True

範例

此範例將列 1 到 4 分組至工作表一

Workbook.Sheets[1].Range['A1', 'A3'].Group;
UnGroup 方法

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;

另請參閱

UnGroup method
ClearOutline method
OutlineLevel property