xlsx2csv icon indicating copy to clipboard operation
xlsx2csv copied to clipboard

Indexing for sheets start at 1 instead of 0

Open bvanelli opened this issue 2 years ago • 2 comments

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 https://github.com/pola-rs/polars/pull/6183 when trying to implement xlsx2csv and openpyxl together in the same API.

bvanelli avatar Jan 21 '23 14:01 bvanelli

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.

dilshod avatar Jan 21 '23 16:01 dilshod

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.

mcrumiller avatar Jun 27 '23 13:06 mcrumiller