-
Notifications
You must be signed in to change notification settings - Fork 53
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
Cells spanning multiple columns or rows #289
Comments
Yes, this is something I would like to deal with in googlesheets4, but have not gotten around to it. Yes, Another relevant function is As for a PR, I should pre-emptively state that this might be a feature that is big enough that I would want to do it myself. So you should just enter into the effort knowing that it might not get merged. But a working PR is always useful. It would give you the capability, sooner rather than later, and would certainly surface the relevant questions and tricky bits. So if you want to have a go, you should (with the caveat above). |
Thanks, that sounds fair. I just had a brief look and I think that the basic functionality can be achieved fairly easily via |
I think one of the harder questions is deciding how to expose merged cells in the user-facing functions. So deciding how the new awareness of merged cells shows up in the user interface. |
Attached is a basic patch for reading merged cell ranges in
Yes, absolutely. To be honest, I am unsure whether this should even be exposed at the higher interface level. If one wants to do it properly, this would need to be supported in the upstream tibbles/pillar, which means a massive overhaul across the entire tidyverse. Not to mention more than a few tough choices, as merged cells don't play well with the basic design of R data frames. In fact, I doubt that this kind of effort will pay off anyway, as any design is likely to introduce tradeoffs that will harm practical use cases. It's probably best to accept that spreadsheets and R use different data models, provide the basic mapping interface for the common case (as is done now), and give the advanced user the space to do advanced stuff if they need to. People who read complex sheets will need to process them anyway before they are useable in R (for example, in our project we also need to consider cell color and notes). Thus, for Looking forward to hearing your thoughts! |
Thanks for starting the experiments! Can you make this as a pull request (as opposed to a patch file)? That's a lot more natural for my workflow. |
We would like to access information about the cells spanning multiple columns or rows. From what I understand, this is implemented by reading the
merges
field from theSheet
object (https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/sheets). I don't think this information is currently imported.I might be interested in submitting a PR for this feature, maybe as an attribute or additional column (n_cols/n_rows) on the tibble returned by
read_cells
?The text was updated successfully, but these errors were encountered: