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

fix(reader): default to first sheet by index if no ID found #54

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mharrisb1
Copy link
Contributor

@mharrisb1 mharrisb1 commented Jan 23, 2025

Fixes bug where we assumed that the first sheet in the spreadsheet would have ID 0 but this can be false like when the user rearranges the sheets or deletes the first sheet.

This is a breaking change for some users that were inadvertently getting the first sheet created even if it wasn't the first sheet by index.

Additionally, this adds a new util function, get_sheet_name_from_index, that works similarily to get_sheet_name_from_id. If we do decide to add new named input for user to select a sheet by index instead of by name then this will allow that feature work to be trivial. For now, it's just used to get the first sheet by index as a fallback if no ID is found in the user input and no sheet name is provided.

Closes #51

@mike-luabase
Copy link

🙏

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

Successfully merging this pull request may close these issues.

Sheet with ID 0 not found
2 participants