Cell Values
Documentation
getValue
Get the value from one or more worksheet cells.
| Parameter | Description |
|---|---|
cellNames |
Cell names and/or ranges. |
GET /api/:guid/:worksheetIndex/value/:cellNames
setValue
Set worksheet cell values.
| Parameter | Description |
|---|---|
data[].x |
Cell X coordinate. |
data[].y |
Cell Y coordinate. |
data[].value |
New value. |
POST /api/:guid/:worksheetIndex/value
Examples
Set multiple values in one request
A successful write returns {"message": "Done", "rev": <n>}.
const baseUrl = 'http://localhost:8009/api';
const token = 'eyJhbGciOiJIUzUxMiIsInR5cCJ9.eyJkb21haW4iOiJsb2NhbGhvc3Q6ODAPQSJ9.Xr2Ir2-zEc_tqV5y6i';
const guid = '15eb1171-5a64-45bf-be96-f52b6125a045';
const headers = { 'Authorization': `Bearer ${token}` };
// Set the values of cells A1 and B1 on worksheet 0
const result = await (await fetch(`${baseUrl}/${guid}/0/value`, {
method: 'POST',
headers,
body: new URLSearchParams({
'data[0][x]': '0',
'data[0][y]': '0',
'data[0][value]': 'Á1',
'data[1][x]': '1',
'data[1][y]': '0',
'data[1][value]': 'B1',
}),
})).json();
console.log(result);