GoogleSheets.jl
GoogleSheets.jl copied to clipboard
[docs][suggestion] `delete_rows!` zero-based and exclusive indexing surprising
I'm new to GoogleSheets and I just figured out that the start_index
and end_index
fields of the range:CellIndexRange1D
parameter to the delete_rows!
function are zero-based, and end_index
is exclusive.
I find this surprising because all the ranges I know of, in both Google Sheets and Julia, are one-based and inclusive, and the similarly named CellRange
uses the traditional A1 notation. After digging down through the layers of abstraction and looking for clues, I eventually found confirmation here: https://developers.google.com/sheets/api/reference/rest/v4/DimensionRange
I'm not sure if this applies to all instances of CellIndexRange1D
, or whether it's restricted to certain use cases like delete_rows!
.
Even though this is ultimately a Google Sheets API peculiarity, perhaps a note in the documentation would help clarify a pretty fundamental question for users of this library.