API to get all rows doesn't return empty rows

Hello,
I’m using the spreadsheet.com API to synchronize a local file with a specific worksheet.

Yet, I just realized that /v1/worksheets/{worksheetId}/rows does not return empty rows, nor any information concerning the position of the returned rows.

Is that normal ? How could I get information concerning the empty rows ?

Thanks

Hello,

Spreadsheet.com API /v1/worksheets/{worksheetId}/rows will not list empty untouched rows. This is it ensure better performance of the API. The rorder of the rows returned by the API is same as their order in the UI worksheet view.

Kindly, let us know your use-case around empty rows? (or) if you notice the order to be different than what you see in the UI?

Regards,
Manooj

Hello,
Thank you for your response. I think that it would be good to have a way to also get the empty rows.
My goal is to synchronize a sheet with external data.
I retrieve the content of the sheet, compare the values with the data I want to sync, using the primary key as reference, and look for modified, deleted or new rows to add. I then modify or delete each row that has changed or was deleted and append new rows at the end.
Yet if there are some empty rows at the end of the sheet, those empty rows remain there.

UPDATE: I just realized that I can retrieve the id of the last row received, and then specify the position row_id:after in order to append new rows just after. Yet, I still think that there should be a way to fully retrieve a worksheet, with empty rows, in order to sync one worksheet with another external worksheet system, and make sure that both sheets are identical (including possible empty rows)

Thanks

@Francois_Birot - The API is currently optimised for a relational table kind of usage ( CRM, Project Mgmt like use-cases). However it does make sense to have an optional flag to enable the usage as an amorphous ( less structured than a table) sheet - eg a Financial model. That would report all visible rows in the Sheet - whether they are initialized or not from a data perspective.

Allow us to get back on this topic.

1 Like

Great, thank you @Murali_Mohan