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

Indexing for sheets start at 1 instead of 0 #249

Open
bvanelli opened this issue Jan 21, 2023 · 2 comments
Open

Indexing for sheets start at 1 instead of 0 #249

bvanelli opened this issue Jan 21, 2023 · 2 comments

Comments

@bvanelli
Copy link

Python arrays start at 0, so it is a bit confusing having to read indexes starting at 1. I know that 0 is meant to read all sheets, but in fact it is more intuitive to use None which is compatible with pandas definitions, for example.

Do you think this is generally a good idea or the current format is enough?

He had some quick discussion here pola-rs/polars#6183 when trying to implement xlsx2csv and openpyxl together in the same API.

@dilshod
Copy link
Owner

dilshod commented Jan 21, 2023

It seems like a good idea, but I don't see any way of changing it. People are using it already.
Or, if you are using it from inside python, we can create a new version with breaking changes, where only python interface changes, and cmd interface doesn't change.

@mcrumiller
Copy link

One argument against this is that Excel itself defaults to Sheet1 as the default first sheet:

image

It's awkward to have Sheet 1 be index 0, Sheet 2 be index 1, etc.

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

3 participants