Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs][suggestion] delete_rows! zero-based and exclusive indexing surprising #25

Open
hraftery opened this issue Aug 24, 2023 · 0 comments

Comments

@hraftery
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant