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

Ordering sheets within Spread object #55

Open
olivermonaco opened this issue Apr 29, 2021 · 1 comment
Open

Ordering sheets within Spread object #55

olivermonaco opened this issue Apr 29, 2021 · 1 comment

Comments

@olivermonaco
Copy link

I've gotten a lot of utility from this package, but I couldn't find that there was a method for reordering or reindexing spreadsheets within a Spread object. I have tried assigning back the Spread.sheets in a new order to the Spread.sheets attribute, but get a can't set attribute error. Would this be a new feature request, or am I missing something?

Thank you

@aiguofer
Copy link
Owner

aiguofer commented May 3, 2021

Thanks for reporting @olivermonaco. Indeed this is currently not possible, but sounds like a good addition!

I think that setting Spread.sheets is probably a good way to implement this, but there probably needs to be some checks to ensure that all sheets are present when setting the order.

I'll see if I can find some time this week to implement this, or a PR would be welcome!

For anyone that can help tackle this, I think what would be required is to add a @sheets.setter method that makes a batchUpdate request, that does a updateSheetProperties for each sheet and updates the index.

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

2 participants