How can I append or add rows below the last row. (in worksheet)

532 Views Asked by At

It is possible to append a row in a table using the method below:

POST /workbook/worksheets/{id|name}/tables/{id|name}/rows/add

How can I do the same but in a worksheet?

Now it's only possible to Update with a specific range:

PATCH /workbook/worksheets/{id|name}/range(address='<address>')

I can't type in the address like "range(address='A(lastRow):C(lastRow)')"

1

There are 1 best solutions below

0
On

First, get the last row number using an Excel function(Match) before appending the row.

POST /me/drive/root:/demo.xlsx:/workbook/functions/match

BODY

{
    "lookupvalue": "",
    "lookuparray": {
        "Address": "sheet1!A:A"
    },
    "matchtype": -1
}

Specify the last row number as the range and update the value.