Group rows
Manage the row groups of your online spreadsheets using the following methods.
Documentation
Available methods for row groups management.
setRowGroup
Set a group of rows.
| Parameter | Description |
|---|---|
row |
index of the first row of the group. |
numOfItems |
number of rows in the group. |
state |
group state (open or closed). |
POST /api/:guid/:worksheetIndex/group/rows
resetRowGroup
Undo a group of rows.
| Parameter | Description |
|---|---|
row |
index of the first row of the group. |
POST /api/:guid/:worksheetIndex/group/rows
Examples
Set row group
Add a group of rows from the second row to the fourth.
const baseUrl = 'http://localhost:8009/api';
const guid = '79b45919-c751-4e2b-a49a-6c1286e2fc03';
const token = 'eyJhbGciOiJIUzUxMiIsInR5cCJ9.eyJkb21haW4iOiJsb2NhbGhvc3Q6ODAPQSJ9.Xr2Ir2-zEc_tqV5y6i';
const headers = { 'Authorization': `Bearer ${token}` };
// Set row group
await fetch(`${baseUrl}/${guid}/0/group/rows`, {
method: 'POST',
headers,
body: new URLSearchParams({
'row': '1',
'numOfItems': '2',
}),
});